[PATCH 1/3] zram: force disksize setting before using zram

2012-11-27 Thread Minchan Kim
ades zram. Apparently it could be a problem if zram is mainline but it still lives in staging so behavior could be changed for right way to go. Let them excuse. Signed-off-by: Minchan Kim --- drivers/staging/zram/zram.txt | 27 +- drive

[PATCH 3/3] zram: get rid of lockdep warning

2012-11-27 Thread Minchan Kim
an fix it. In addition, this patch replace GFP_KERNEL with GFP_NOIO/GFP_ATOMIC in request handle path for partion I/O. [1] zram: give up lazy initialization of zram metadata Signed-off-by: Minchan Kim --- drivers/staging/zram/zram_drv.c | 139 - drivers/staging/zr

[PATCH 2/3] zram: give up lazy initialization of zram metadata

2012-11-27 Thread Minchan Kim
20, it could consume 6% of ram but efficieny of zram will cover the waste. So this patch gives up lazy initialization and instead we initialize metadata at disksize setting time. Signed-off-by: Minchan Kim --- drivers/staging/zram/zram_drv.c | 19 --- drivers/staging/zram

Re: [PATCH 1/2] zram: force disksize setting before using zram

2012-11-27 Thread Minchan Kim
On Mon, Nov 26, 2012 at 09:04:47PM -0800, Nitin Gupta wrote: > On 11/22/2012 06:42 PM, Minchan Kim wrote: > >Now zram document syas "set disksize is optional" > >but partly it's wrong. When you try to use zram firstly after > >booting, you must set disksiz

Re: [PATCH 2/2] zram: allocate metadata when disksize is set up

2012-11-27 Thread Minchan Kim
On Mon, Nov 26, 2012 at 09:13:24PM -0800, Nitin Gupta wrote: > On 11/22/2012 06:42 PM, Minchan Kim wrote: > >Lockdep complains about recursive deadlock of zram->init_lock. > >Because zram_init_device could be called in reclaim context and > >it requires a page with GFP_KERN

Re: [PATCH 2/2] zram: allocate metadata when disksize is set up

2012-11-27 Thread Minchan Kim
On Tue, Nov 27, 2012 at 04:45:54PM +0100, Jerome Marchand wrote: > On 11/27/2012 06:13 AM, Nitin Gupta wrote: > > On 11/22/2012 06:42 PM, Minchan Kim wrote: > >> Lockdep complains about recursive deadlock of zram->init_lock. > >> Because zram_init_device could be

Re: [PATCH] zram: Prevent use of unmapped buffer

2012-11-27 Thread Minchan Kim
more carefully. :( Please resend it with revised descrption and title. I will rebase mh patchset just sent on top of this bug fix patch. P.S) Sigh, Now code isn't clean due to partial read/write path handling. IMHO, sooner or later, we need refactoring. -- Kind regards, Minchan Kim -- To unsubsc

Re: Lockdep complain for zram

2012-11-27 Thread Minchan Kim
On Fri, Nov 23, 2012 at 03:46:31PM +0100, Jerome Marchand wrote: > On 11/23/2012 12:34 AM, Minchan Kim wrote: > > On Thu, Nov 22, 2012 at 12:13:24PM +0100, Jerome Marchand wrote: > >> On 11/21/2012 09:37 AM, Minchan Kim wrote: > >>> Hi alls, > >>> &g

Re: [PATCH] zram: Prevent use of unmapped buffer

2012-11-28 Thread Minchan Kim
On Wed, Nov 28, 2012 at 02:15:05PM +0900, Minchan Kim wrote: > Hi Nitin, > > On Mon, Nov 26, 2012 at 11:26:07PM -0800, Nitin Gupta wrote: > > The commit c8f2f0db1 ("zram: Fix handling of incompressible pages") > > introduced a bug which caused a kunmap()'ed

Re: [PATCH 3/3] zram: get rid of lockdep warning

2012-11-28 Thread Minchan Kim
On Wed, Nov 28, 2012 at 03:54:45PM +0100, Jerome Marchand wrote: > On 11/28/2012 03:35 AM, Minchan Kim wrote: > > Lockdep complains about recursive deadlock of zram->init_lock. > > [1] made it false positive because we can't request IO to zram > > before setting dis

Re: [PATCH] zram: Prevent use of unmapped buffer

2012-11-28 Thread Minchan Kim
On Thu, Nov 29, 2012 at 10:45 AM, Nitin Gupta wrote: > On 11/28/2012 05:33 PM, Minchan Kim wrote: >> >> On Wed, Nov 28, 2012 at 02:15:05PM +0900, Minchan Kim wrote: >>> >>> Hi Nitin, >>> >>> On Mon, Nov 26, 2012 at 11:26:07PM -0800, Nitin Gupt

Re: [PATCH 1/2] zsmalloc: add function to query object size

2012-11-28 Thread Minchan Kim
t_object_size(struct zs_pool *pool, unsigned long handle) > +{ > + struct page *endpage; > + unsigned int endoffset, size; > + > + unsigned int class_idx; > + enum fullness_group fg; > + struct size_class *class; > + > + decode_ptr(handle,

Re: [PATCH v2] zram: Fix use-after-free bug in disk write case

2012-11-28 Thread Minchan Kim
t;-- So, src is dangling. 6) memcpy(cmem, src, clen) <-- HIT > > Signed-off-by: Nitin Gupta > Reported-by: Mihail Kasadjikov > Reported-by: Tomas M > Reviewed-by: Minchan Kim > --- > drivers/staging/zram/zram_drv.c | 39 > --- > 1

Re: [PATCH v2 1/2] zsmalloc: add function to query object size

2012-11-28 Thread Minchan Kim
enum fullness_group fg; > + struct size_class *class; > + > + decode_ptr(handle, &endpage, &endoffset); > + get_zspage_mapping(endpage, &class_idx, &fg); > + class = &pool->size_class[class_idx]; > + > + size = endoffset + 1; > + if (endoffset < get_page_index(endpage)) > + size += class->size - get_page_index(endpage); > + else > + size -= rounddown(endoffset, class->size); > + > + return size; > +} > +EXPORT_SYMBOL_GPL(zs_get_object_size); > + > u64 zs_get_total_size_bytes(struct zs_pool *pool) > { > int i; > diff --git a/drivers/staging/zsmalloc/zsmalloc.h > b/drivers/staging/zsmalloc/zsmalloc.h > index de2e8bf..2830fdf 100644 > --- a/drivers/staging/zsmalloc/zsmalloc.h > +++ b/drivers/staging/zsmalloc/zsmalloc.h > @@ -38,6 +38,7 @@ void *zs_map_object(struct zs_pool *pool, unsigned long > handle, > enum zs_mapmode mm); > void zs_unmap_object(struct zs_pool *pool, unsigned long handle); > > +size_t zs_get_object_size(struct zs_pool *pool, unsigned long handle); > u64 zs_get_total_size_bytes(struct zs_pool *pool); > > #endif > -- > 1.7.10.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- Kind regards, Minchan Kim -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v2] zram: Fix use-after-free bug in disk write case

2012-11-29 Thread Minchan Kim
On Thu, Nov 29, 2012 at 12:44:14AM -0800, Nitin Gupta wrote: > On 11/28/2012 11:55 PM, Minchan Kim wrote: > >Hi Nitin, > > > >On Wed, Nov 28, 2012 at 11:45:06PM -0800, Nitin Gupta wrote: > >>Changelog v2 vs v1: > >> - Changelog message now correctly ex

Re: [PATCH 1/2] zsmalloc: add function to query object size

2012-11-29 Thread Minchan Kim
On Thu, Nov 29, 2012 at 01:09:56AM -0800, Nitin Gupta wrote: > On 11/28/2012 11:45 PM, Minchan Kim wrote: > >On Mon, Nov 26, 2012 at 11:26:40PM -0800, Nitin Gupta wrote: > >>Adds zs_get_object_size(handle) which provides the size of > >>the given object. This is usef

Re: [PATCH v3] zram: fix invalid memory references during disk write

2012-11-29 Thread Minchan Kim
data: In this > case, reference was made to a kfree()'ed buffer. > > Fixes bug 50081: > https://bugzilla.kernel.org/show_bug.cgi?id=50081 > > Signed-off-by: Nitin Gupta > Reported-by: Mihail Kasadjikov > Reported-by: Tomas M > Reviewed-by: Minchan Kim > --- >

Re: [PATCH 1/2] zsmalloc: add function to query object size

2012-11-29 Thread Minchan Kim
On Thu, Nov 29, 2012 at 04:53:15PM -0800, Nitin Gupta wrote: > On Thu, Nov 29, 2012 at 4:03 PM, Minchan Kim wrote: > > On Thu, Nov 29, 2012 at 01:09:56AM -0800, Nitin Gupta wrote: > >> On 11/28/2012 11:45 PM, Minchan Kim wrote: > >> >On Mon, Nov 26, 2012 at 11:26

[PATCH v7 1/4] zram: Fix deadlock bug in partial read/write

2013-02-03 Thread Minchan Kim
d-off-by: Pekka Enberg Signed-off-by: Minchan Kim --- drivers/staging/zram/zram_drv.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c index 941b7c6..262265e 100644 --- a/drivers/staging/zram/zram_drv

[PATCH v7 4/4] zram: get rid of lockdep warning

2013-02-03 Thread Minchan Kim
: Jerome Marchand Signed-off-by: Minchan Kim --- drivers/staging/zram/zram_drv.c | 189 +++-- drivers/staging/zram/zram_drv.h | 12 ++- drivers/staging/zram/zram_sysfs.c | 11 ++- 3 files changed, 116 insertions(+), 96 deletions(-) diff --git a/drivers/stag

[PATCH v7 2/4] zram: force disksize setting before using zram

2013-02-03 Thread Minchan Kim
ades zram. Apparently it could be a problem if zram is mainline but it still lives in staging so behavior could be changed for right way to go. Let them excuse. Acked-by: Jerome Marchand Acked-by: Nitin Gupta Acked-by: Dan Magenheimer Signed-off-by: Minchan Kim --- drive

[PATCH v7 3/4] zram: give up lazy initialization of zram metadata

2013-02-03 Thread Minchan Kim
20, it could consume 6% of ram but efficieny of zram will cover the waste. So this patch gives up lazy initialization and instead we initialize metadata at disksize setting time. Acked-by: Jerome Marchand Acked-by: Nitin Gupta Signed-off-by: Minchan Kim --- drivers/staging/zram/zram_d

Re: [PATCH v7 1/4] zram: Fix deadlock bug in partial read/write

2013-02-03 Thread Minchan Kim
Hi Greg, I added all Acked-by and rebased on next-20130202. Please apply this. On Mon, Feb 04, 2013 at 08:46:08AM +0900, Minchan Kim wrote: > Now zram allocates new page with GFP_KERNEL in zram I/O path > if IO is partial. Unfortunately, It may cause deadlock with > reclaim path l

Re: [PATCH] zsmalloc: Fix TLB coherency and build problem

2013-02-03 Thread Minchan Kim
On Fri, Feb 01, 2013 at 02:02:18PM +, Russell King - ARM Linux wrote: > On Mon, Jan 28, 2013 at 10:00:08AM +0900, Minchan Kim wrote: > > @@ -663,7 +661,7 @@ static inline void __zs_unmap_object(struct > > mapping_area *area, > > > > f

[PATCH] zsmalloc: Add Kconfig for enabling PTE method

2013-02-03 Thread Minchan Kim
new Kconfig to select the approach. This patch is based on next-20130202. [1] https://lkml.org/lkml/2012/7/11/58 Cc: Andrew Morton Cc: Seth Jennings Cc: Nitin Gupta Cc: Dan Magenheimer Cc: Konrad Rzeszutek Wilk Signed-off-by: Minchan Kim --- drivers/staging/zsmalloc/Kconfig | 12

Re: next-20130128 lockdep whinge in sys_swapon()

2013-02-03 Thread Minchan Kim
2.498719] Adding 2097148k swap on /dev/mapper/vg_blackice-swap. > Priority:-1 extents:1 across:2097148k > > Somebody care to sprinkle the appropriate annotations on that code? Could you test this patch? >From 81cae17c55ade897a7e06b01c864f1c250b40f8b Mon Sep 17 00:00:00 2001 From: Minchan

Re: Questin about swap_slot free and invalidate page

2013-02-03 Thread Minchan Kim
Hi Hugh, On Sun, Feb 03, 2013 at 05:51:14PM -0800, Hugh Dickins wrote: > On Thu, 31 Jan 2013, Minchan Kim wrote: > > > When I reviewed zswap, I was curious about frontswap_store. > > It said following as. > > > > * If frontswap already contains a page with match

Re: [PATCH] zsmalloc: Add Kconfig for enabling PTE method

2013-02-03 Thread Minchan Kim
On Sun, Feb 03, 2013 at 08:02:09PM -0600, Simon Jeons wrote: > On Mon, 2013-02-04 at 09:23 +0900, Minchan Kim wrote: > > Zsmalloc has two methods 1) copy-based and 2) pte based to access > > allocations that span two pages. > > You can see history why we supported

Re: [PATCH v6 4/4] zram: get rid of lockdep warning

2013-02-03 Thread Minchan Kim
Hi Greg, On Sun, Feb 03, 2013 at 05:53:33PM -0800, Greg Kroah-Hartman wrote: > On Wed, Jan 30, 2013 at 11:41:42AM +0900, Minchan Kim wrote: > > Lockdep complains about recursive deadlock of zram->init_lock. > > [1] made it false positive because we can't request IO to

Re: [PATCH v6 4/4] zram: get rid of lockdep warning

2013-02-03 Thread Minchan Kim
On Sun, Feb 03, 2013 at 07:50:13PM -0800, Greg Kroah-Hartman wrote: > On Mon, Feb 04, 2013 at 12:42:08PM +0900, Minchan Kim wrote: > > Hi Greg, > > > > On Sun, Feb 03, 2013 at 05:53:33PM -0800, Greg Kroah-Hartman wrote: > > > On Wed, Jan 30, 2013 at 11:41

Re: [PATCH] mm: cma: fix accounting of CMA pages placed in high memory

2013-02-04 Thread Minchan Kim
dy to majord...@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: mailto:"d...@kvack.org";> em...@kvack.org -- Kind regards, Minchan Kim -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

Re: [PATCH] mm: cma: fix accounting of CMA pages placed in high memory

2013-02-04 Thread Minchan Kim
ailto:"d...@kvack.org";> em...@kvack.org > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majord...@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: mailto:"d...@kva

Re: [PATCH] zsmalloc: Add Kconfig for enabling PTE method

2013-02-04 Thread Minchan Kim
Hi Greg, On Mon, Feb 04, 2013 at 10:51:46AM -0800, Greg Kroah-Hartman wrote: > On Mon, Feb 04, 2013 at 09:23:41AM +0900, Minchan Kim wrote: > > Zsmalloc has two methods 1) copy-based and 2) pte based to access > > allocations that span two pages. > > You can see history

Re: [PATCH] mm: cma: fix accounting of CMA pages placed in high memory

2013-02-04 Thread Minchan Kim
On Tue, Feb 05, 2013 at 08:52:02AM +0900, Kyungmin Park wrote: > Hi, > > On Tue, Feb 5, 2013 at 8:43 AM, Minchan Kim wrote: > > Hello, > > > > On Tue, Feb 05, 2013 at 08:29:26AM +0900, Kyungmin Park wrote: > >> On Tue, Feb 5, 2013 at 8:06 AM, Andrew Morton

Re: [PATCH 0/2] mm: hotplug: implement non-movable version of get_user_pages() to kill long-time pin pages

2013-02-04 Thread Minchan Kim
> > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majord...@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: mailto:"d...@kvack.org";> em...@kvack.org -- Kind regards, Minchan

Re: Questin about swap_slot free and invalidate page

2013-02-04 Thread Minchan Kim
On Mon, Feb 04, 2013 at 01:28:55PM -0800, Dan Magenheimer wrote: > > From: Minchan Kim [mailto:minc...@kernel.org] > > Sent: Sunday, February 03, 2013 7:50 PM > > To: Hugh Dickins > > Cc: Nitin Gupta; Dan Magenheimer; Seth Jennings; Konrad Rzeszutek Wilk; > > linu

Re: [PATCH 1/2] mm: prevent to add a page to swap if may_writepage is unset

2013-02-04 Thread Minchan Kim
On Tue, Jan 22, 2013 at 09:09:54AM +0900, Minchan Kim wrote: > On Mon, Jan 21, 2013 at 09:39:06AM -0500, Rik van Riel wrote: > > On 01/20/2013 08:52 PM, Minchan Kim wrote: > > > > > From 94086dc7152359d052802c55c82ef19509fe8cce Mon Sep 17 00:00:00 2001 > > >From

Re: [PATCH 0/2] mm: hotplug: implement non-movable version of get_user_pages() to kill long-time pin pages

2013-02-04 Thread Minchan Kim
Hi Lin, On Tue, Feb 05, 2013 at 12:42:48PM +0800, Lin Feng wrote: > Hi Minchan, > > On 02/05/2013 08:58 AM, Minchan Kim wrote: > > Hello, > > > > On Mon, Feb 04, 2013 at 06:04:06PM +0800, Lin Feng wrote: > >> Currently get_user_pages() always tries to al

Re: [PATCH v7 2/4] zram: force disksize setting before using zram

2013-02-04 Thread Minchan Kim
On Mon, Feb 04, 2013 at 01:33:15AM -0600, Ric Mason wrote: > Hi Minchan, > On Mon, 2013-02-04 at 08:46 +0900, Minchan Kim wrote: > > Now zram document syas "set disksize is optional" > > but partly it's wrong. When you try to use zram firstly after > > bo

Re: [PATCH v7 4/4] zram: get rid of lockdep warning

2013-02-04 Thread Minchan Kim
On Mon, Feb 04, 2013 at 01:39:24AM -0600, Ric Mason wrote: > On Mon, 2013-02-04 at 08:46 +0900, Minchan Kim wrote: > > Lockdep complains about recursive deadlock of zram->init_lock. > > [1] made it false positive because we can't request IO to zram > > before settin

Re: [PATCH] mm: cma: fix accounting of CMA pages placed in high memory

2013-02-04 Thread Minchan Kim
Hi Marek, On Tue, Feb 05, 2013 at 08:10:19AM +0100, Marek Szyprowski wrote: > Hello, > > On 2/5/2013 12:34 AM, Minchan Kim wrote: > >On Mon, Feb 04, 2013 at 11:27:05AM +0100, Marek Szyprowski wrote: > >> The total number of low memory pages is determined as > >>

Re: [PATCH 0/2] mm: hotplug: implement non-movable version of get_user_pages() to kill long-time pin pages

2013-02-04 Thread Minchan Kim
On Tue, Feb 05, 2013 at 02:18:42PM +0800, Lin Feng wrote: > > > On 02/05/2013 01:25 PM, Minchan Kim wrote: > > Hi Lin, > > > > On Tue, Feb 05, 2013 at 12:42:48PM +0800, Lin Feng wrote: > >> Hi Minchan, > >> > >> On 02/05/2013 08:58 AM, Minc

Re: [PATCH] mm: cma: fix accounting of CMA pages placed in high memory

2013-02-05 Thread Minchan Kim
On Tue, Feb 05, 2013 at 09:38:30AM +0100, Marek Szyprowski wrote: > Hello, > > On 2/5/2013 1:40 AM, Minchan Kim wrote: > > ... > > >> Previous time, it's not fully tested and now we checked it with > >> highmem support patches. > > > >I ge

[PATCH] mm: Get rid of lockdep whinge on sys_swapon

2013-02-05 Thread Minchan Kim
[1] forgot to initialize spin_lock so lockdep is whingeing about it. This patch fixes it. [1] 0f181e0e4, swap: add per-partition lock for swapfile Cc: Shaohua Li Reported/Tested-by: Valdis Kletnieks Signed-off-by: Minchan Kim --- mm/swapfile.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH] zram: fix warning of print format

2013-02-05 Thread Minchan Kim
kbuild bot whinges due to print format mistmatch caused by zram: force disksize setting before using zram. This patch fixes it. Reported-by: Wu Fengguang Signed-off-by: Minchan Kim --- drivers/staging/zram/zram_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[RESNED PATCH] zram: get rid of lockdep warning

2013-02-05 Thread Minchan Kim
: Jerome Marchand Acked-by: Nitin Gupta Signed-off-by: Minchan Kim --- Rebased on next-20130205 Greg, I resolved conflict. Please merge this because other patches are waiting. drivers/staging/zram/zram_drv.c | 189 -- drivers/staging/zram/zram_drv.h | 12 ++-

Re: [PATCH V2 1/2] mm: hotplug: implement non-movable version of get_user_pages() called get_user_pages_non_movable()

2013-02-05 Thread Minchan Kim
a additional page migration. > > > > Cc: Andrew Morton > > Cc: Mel Gorman > > Cc: KAMEZAWA Hiroyuki > > Cc: Yasuaki Ishimatsu > > Cc: Jeff Moyer > > Cc: Minchan Kim > > Cc: Zach Brown > > Reviewed-by: Tang Chen > > Reviewed-by: Gu

Re: [PATCH] zsmalloc: Add Kconfig for enabling PTE method

2013-02-05 Thread Minchan Kim
On Tue, Feb 05, 2013 at 11:25:20AM -0800, Greg Kroah-Hartman wrote: > On Tue, Feb 05, 2013 at 09:08:54AM +0900, Minchan Kim wrote: > > Hi Greg, > > > > On Mon, Feb 04, 2013 at 10:51:46AM -0800, Greg Kroah-Hartman wrote: > > > On Mon, Feb 04, 2013 at 09:23

Re: [PATCH] zsmalloc: Add Kconfig for enabling PTE method

2013-02-05 Thread Minchan Kim
Hi Greg, On Tue, Feb 05, 2013 at 05:42:59PM -0800, Greg Kroah-Hartman wrote: > On Wed, Feb 06, 2013 at 10:17:21AM +0900, Minchan Kim wrote: > > > > > Did you test this? I don't see the new config value you added > > > > > actually > > > >

[PATCH v2] zsmalloc: Add Kconfig for enabling PTE method

2013-02-05 Thread Minchan Kim
Morton Cc: Seth Jennings Cc: Nitin Gupta Cc: Dan Magenheimer Cc: Konrad Rzeszutek Wilk Signed-off-by: Minchan Kim --- drivers/staging/zsmalloc/Kconfig | 12 drivers/staging/zsmalloc/zsmalloc-main.c | 20 +--- 2 files changed, 17 insertions(+), 15 deletions

Re: [PATCH v2] zsmalloc: Add Kconfig for enabling PTE method

2013-02-05 Thread Minchan Kim
On Tue, Feb 05, 2013 at 06:28:54PM -0800, Greg Kroah-Hartman wrote: > On Wed, Feb 06, 2013 at 11:17:08AM +0900, Minchan Kim wrote: > > diff --git a/drivers/staging/zsmalloc/Kconfig > > b/drivers/staging/zsmalloc/Kconfig > > index 9084565..232b3b6 100644 > > --- a/drive

Re: [PATCH v2] zsmalloc: Add Kconfig for enabling PTE method

2013-02-06 Thread Minchan Kim
On Wed, Feb 06, 2013 at 10:47:16AM -0600, Seth Jennings wrote: > On 02/05/2013 08:17 PM, Minchan Kim wrote: > > Zsmalloc has two methods 1) copy-based and 2) pte-based to access > > allocations that span two pages. You can see history why we supported > > two approach from [1]

Re: [PATCH V2 1/2] mm: hotplug: implement non-movable version of get_user_pages() called get_user_pages_non_movable()

2013-02-07 Thread Minchan Kim
Hi Mel, On Wed, Feb 06, 2013 at 09:56:17AM +, Mel Gorman wrote: > On Wed, Feb 06, 2013 at 09:42:34AM +0900, Minchan Kim wrote: > > On Tue, Feb 05, 2013 at 12:01:37PM +, Mel Gorman wrote: > > > On Tue, Feb 05, 2013 at 05:21:52PM +0800, Lin Feng wrote: > > > >

Re: [PATCH] THP: Use explicit memory barrier

2013-04-02 Thread Minchan Kim
On Tue, Apr 02, 2013 at 12:30:15PM -0700, Hugh Dickins wrote: > On Tue, 2 Apr 2013, Minchan Kim wrote: > > On Mon, Apr 01, 2013 at 04:35:38PM -0700, David Rientjes wrote: > > > On Mon, 1 Apr 2013, Minchan Kim wrote: > > > > > > > __do_huge_pmd_anonymous_p

Re: [RFC 4/4] mm: Enhance per process reclaim

2013-04-02 Thread Minchan Kim
Hey Michael, On Tue, Apr 02, 2013 at 03:25:25PM +0200, Michael Kerrisk wrote: > Minchan, > > On Mon, Mar 25, 2013 at 7:21 AM, Minchan Kim wrote: > > > > Some pages could be shared by several processes. (ex, libc) > > In case of that, it's too bad to reclaim them

Re: [PATCHv2, RFC 20/30] ramfs: enable transparent huge page cache

2013-04-02 Thread Minchan Kim
t; that it does not set a suitable ->migratepage method, so would be > handled by fallback_migrate_page(), whose PageDirty test will end > up failing the migration with -EBUSY or -EINVAL - if I read it > correctly. True. > > Perhaps other such reasons would surface once those are fixed.

Re: [RFC 1/4] mm: Per process reclaim

2013-04-03 Thread Minchan Kim
Hi Michael, On Wed, Apr 03, 2013 at 11:17:58AM +0200, Michael Kerrisk wrote: > Hello Minchan, > > On Mon, Mar 25, 2013 at 7:21 AM, Minchan Kim wrote: > > These day, there are many platforms avaiable in the embedded market > > and they are smarter than kernel which has ver

Re: [RFC 1/4] mm: Per process reclaim

2013-04-03 Thread Minchan Kim
On Wed, Apr 03, 2013 at 12:10:22PM +0200, Michael Kerrisk wrote: > Hello Minchan, > > On Mon, Mar 25, 2013 at 7:21 AM, Minchan Kim wrote: > > These day, there are many platforms avaiable in the embedded market > > and they are smarter than kernel which has very limited

Re: [RFC PATCH 0/4] Support vranges on files

2013-04-03 Thread Minchan Kim
gt; > Let me know if you have any thoughts or comments. I'm sure there's > plenty of room for improvement here. > > In the meantime I'll be playing with some different approaches to > try to handle single volatile ranges that cross file and anonymous > vmas.

Re: [RFC PATCH 0/4] Support vranges on files

2013-04-05 Thread Minchan Kim
Hi John, On Thu, Apr 04, 2013 at 10:37:52AM -0700, John Stultz wrote: > On 04/03/2013 11:55 PM, Minchan Kim wrote: > >On Wed, Apr 03, 2013 at 04:52:19PM -0700, John Stultz wrote: > >>Next we introduce a parallel fvrange() syscall for creating > >>volatile ranges dire

Re: [PATCHv2, RFC 20/30] ramfs: enable transparent huge page cache

2013-04-05 Thread Minchan Kim
On Fri, Apr 05, 2013 at 02:47:25PM +0800, Simon Jeons wrote: > Hi Minchan, > On 04/03/2013 09:11 AM, Minchan Kim wrote: > >On Tue, Apr 02, 2013 at 03:15:23PM -0700, Hugh Dickins wrote: > >>On Tue, 2 Apr 2013, Kirill A. Shutemov wrote: > >>>Kirill A. Shutemov wrote

[PATCH] THP: fix comment about memory barrier

2013-04-05 Thread Minchan Kim
t. It means we needs COMMENT about that. [1] 0ed361dec "mm: fix PageUptodate data race" Cc: Mel Gorman Cc: Hugh Dickins Cc: Kamezawa Hiroyuki Cc: David Rientjes Cc: Peter Zijlstra Acked-by: Andrea Arcangeli Signed-off-by: Minchan Kim --- * from v1 * Add Acked-by from Andr

Re: [PATCHv2, RFC 20/30] ramfs: enable transparent huge page cache

2013-04-05 Thread Minchan Kim
Hi Wanpeng, On Fri, Apr 05, 2013 at 04:22:17PM +0800, Wanpeng Li wrote: > On Fri, Apr 05, 2013 at 05:01:06PM +0900, Minchan Kim wrote: > >On Fri, Apr 05, 2013 at 02:47:25PM +0800, Simon Jeons wrote: > >> Hi Minchan, > >> On 04/03/2013 09:11 AM, Minchan Kim wrote: >

Re: [RESEND PATCH v5 1/4] zram: Fix deadlock bug in partial write

2013-01-28 Thread Minchan Kim
On Mon, Jan 28, 2013 at 09:16:35AM +0200, Pekka Enberg wrote: > On Mon, Jan 28, 2013 at 2:38 AM, Minchan Kim wrote: > > Now zram allocates new page with GFP_KERNEL in zram I/O path > > if IO is partial. Unfortunately, It may cuase deadlock with > > s/cuase/cause/g Thanks!

Re: [PATCH 1/4] staging: zsmalloc: add gfp flags to zs_create_pool

2013-01-28 Thread Minchan Kim
On Mon, Jan 28, 2013 at 10:16:38AM -0500, Konrad Rzeszutek Wilk wrote: > On Mon, Jan 28, 2013 at 12:39:44PM +0900, Minchan Kim wrote: > > Hi Seth, > > > > On Fri, Jan 25, 2013 at 11:46:15AM -0600, Seth Jennings wrote: > > > zs_create_pool() currently takes a gfp fla

Re: [PATCH 1/4] staging: zsmalloc: add gfp flags to zs_create_pool

2013-01-28 Thread Minchan Kim
On Mon, Jan 28, 2013 at 11:01:28AM -0600, Seth Jennings wrote: > On 01/27/2013 09:39 PM, Minchan Kim wrote: > > Hi Seth, > > > > On Fri, Jan 25, 2013 at 11:46:15AM -0600, Seth Jennings wrote: > >> zs_create_pool() currently takes a gfp flags argument > >> th

Re: [PATCH 0/4] staging: zsmalloc: various cleanups/improvments

2013-01-28 Thread Minchan Kim
On Mon, Jan 28, 2013 at 11:07:10AM -0600, Seth Jennings wrote: > On 01/27/2013 09:47 PM, Minchan Kim wrote: > > Hi Seth, > > > > On Fri, Jan 25, 2013 at 11:46:14AM -0600, Seth Jennings wrote: > >> These patches are the first 4 patches of the zswap patchset I > >

Re: [PATCHv2 7/9] mm: break up swap_writepage() for frontswap backends

2013-01-28 Thread Minchan Kim
On Mon, Jan 28, 2013 at 11:26:43AM -0600, Seth Jennings wrote: > On 01/27/2013 10:22 PM, Minchan Kim wrote: > > On Mon, Jan 07, 2013 at 02:24:38PM -0600, Seth Jennings wrote: > >> swap_writepage() is currently where frontswap hooks into the swap > >> write pat

Re: [PATCHv3 2/6] zsmalloc: promote to lib/

2013-01-28 Thread Minchan Kim
re where > high-order (greater than 0) page allocation are very likely to > fail. > > For more information on zsmalloc and its internals, read the > documentation at the top of the zsmalloc.c file. > > Signed-off-by: Seth Jennings Acked-by: Minchan Kim At least, maintai

Re: [PATCHv3 3/6] mm: break up swap_writepage() for frontswap backends

2013-01-28 Thread Minchan Kim
riteback beyond the frontswap_store() hook. > > __add_to_swap_cache() is also made non-static so that the page for > which writeback is to be resumed can be added to the swap cache. > > Signed-off-by: Seth Jennings Acked-by: Minchan Kim -- Kind regards, Minchan Kim -- To unsubscribe from t

Re: [PATCHv3 4/6] mm: allow for outstanding swap writeback accounting

2013-01-28 Thread Minchan Kim
o_write(), the normal bio completion function, is also > made non-static so that code doing the accounting can call it > after the accounting is done. > > Signed-off-by: Seth Jennings Acked-by: Minchan Kim -- Kind regards, Minchan Kim -- To unsubscribe from this list: send the

Re: [PATCHv3 5/6] zswap: add to mm/

2013-01-28 Thread Minchan Kim
ntry *zswap_debugfs_root; > + > +static int __init zswap_debugfs_init(void) > +{ > + if (!debugfs_initialized()) > + return -ENODEV; > + > + zswap_debugfs_root = debugfs_create_dir("zswap", NULL); > + if (!zswap_debugfs_root) > +

Re: [RESEND PATCH v5 1/4] zram: Fix deadlock bug in partial write

2013-01-29 Thread Minchan Kim
On Tue, Jan 29, 2013 at 09:11:08AM +0200, Pekka Enberg wrote: > On Tue, Jan 29, 2013 at 1:21 AM, Minchan Kim wrote: > > How about this? > > - >8 --- > > > > From 9f8756ae0b0f2819f93cb94dcd38da372843aa12 Mon

[PATCH v6 1/4] zram: Fix deadlock bug in partial read/write

2013-01-29 Thread Minchan Kim
y: Pekka Enberg Signed-off-by: Minchan Kim --- drivers/staging/zram/zram_drv.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c index 77a3f0d..5ff8749 100644 --- a/drivers/staging/zram/zram_drv.c +++ b

[PATCH v6 4/4] zram: get rid of lockdep warning

2013-01-29 Thread Minchan Kim
Marchand Acked-by: Nitin Gupta Signed-off-by: Minchan Kim --- drivers/staging/zram/zram_drv.c | 189 +++-- drivers/staging/zram/zram_drv.h | 12 ++- drivers/staging/zram/zram_sysfs.c | 11 ++- 3 files changed, 116 insertions(+), 96 deletions(-) diff --git a

[PATCH v6 3/4] zram: give up lazy initialization of zram metadata

2013-01-29 Thread Minchan Kim
20, it could consume 6% of ram but efficieny of zram will cover the waste. So this patch gives up lazy initialization and instead we initialize metadata at disksize setting time. Cc: Jerome Marchand Acked-by: Nitin Gupta Signed-off-by: Minchan Kim --- drivers/staging/zram/zram_d

[PATCH v6 2/4] zram: force disksize setting before using zram

2013-01-29 Thread Minchan Kim
ades zram. Apparently it could be a problem if zram is mainline but it still lives in staging so behavior could be changed for right way to go. Let them excuse. Cc: Jerome Marchand Acked-by: Nitin Gupta Acked-by: Dan Magenheimer Signed-off-by: Minchan Kim --- drivers/staging/zram/zram.txt |

Re: [PATCH] zsmalloc: Fix TLB coherency and build problem

2013-01-29 Thread Minchan Kim
Ping On Mon, Jan 28, 2013 at 10:00:08AM +0900, Minchan Kim wrote: > Recently, Matt Sealey reported he fail to build zsmalloc caused by > using of local_flush_tlb_kernel_range which are architecture dependent > function so !CONFIG_SMP in ARM couldn't implement it so it ends up

Re: [PATCHv4 0/7] zswap: compressed swap caching

2013-01-29 Thread Minchan Kim
f zswap might be not merged, we don't need [1, 3] > at the moment. You could argue that [1, 3] make zsmalloc more flexible > and I agree. BUT I want it when we have needs. It would be not too late. > So [1,3] should be part of zswap patchset. -- Kind regards, Minchan Kim -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCHv3 5/6] zswap: add to mm/

2013-01-29 Thread Minchan Kim
On Tue, Jan 29, 2013 at 11:26:48AM -0600, Seth Jennings wrote: > On 01/29/2013 12:27 AM, Minchan Kim wrote: > > First feeling is it's simple and nice approach. > > Although we have some problems to decide policy, it could solve by later > > patch > > so I hope we

Re: [RESEND PATCH v5 1/4] zram: Fix deadlock bug in partial write

2013-01-30 Thread Minchan Kim
Hi Greg, On Tue, Jan 29, 2013 at 11:20:06PM -0500, Greg Kroah-Hartman wrote: > On Mon, Jan 28, 2013 at 09:38:23AM +0900, Minchan Kim wrote: > > Now zram allocates new page with GFP_KERNEL in zram I/O path > > if IO is partial. Unfortunately, It may cuase deadlock with > >

Questin about swap_slot free and invalidate page

2013-01-30 Thread Minchan Kim
least, we should write out comment above frontswap_store about that to notice curious guys who spend many time to know WHY and smart guys who are going to fix it with nice way. Mr. Frontswap, What do you think about it? -- Kind regards, Minchan Kim -- To unsubscribe from this list: send the lin

Re: [PATCHv2 1/9] staging: zsmalloc: add gfp flags to zs_create_pool

2013-01-30 Thread Minchan Kim
On Wed, Jan 30, 2013 at 11:11:47AM -0500, Konrad Rzeszutek Wilk wrote: > On Mon, Jan 28, 2013 at 11:59:17AM +0900, Minchan Kim wrote: > > On Fri, Jan 25, 2013 at 07:56:29AM -0800, Dan Magenheimer wrote: > > > > From: Seth Jennings [mailto:sjenn...@linux.vnet.ibm.com] > >

Re: [PATCHv4 2/7] zsmalloc: promote to lib/

2013-01-30 Thread Minchan Kim
after modifying it) > > than to add yet another new one. The really-good-changelog should > > be compelling on this point, please. > > > > See, I (and I assume others) are totally on first base here and we need > > to get through this before we can get onto zs

Re: [RESEND PATCH v5 1/4] zram: Fix deadlock bug in partial write

2013-01-30 Thread Minchan Kim
On Wed, Jan 30, 2013 at 05:21:12PM +0900, Minchan Kim wrote: > Hi Greg, > > On Tue, Jan 29, 2013 at 11:20:06PM -0500, Greg Kroah-Hartman wrote: > > On Mon, Jan 28, 2013 at 09:38:23AM +0900, Minchan Kim wrote: > > > Now zram allocates new page with GFP_KERNEL in zram

Re: [PATCHv4 3/7] zswap: add to mm/

2013-01-30 Thread Minchan Kim
mpress_poor", S_IRUGO, > + zswap_debugfs_root, &zswap_reject_compress_poor); > + debugfs_create_u64("duplicate_entry", S_IRUGO, > + zswap_debugfs_root, &zswap_duplicate_entry); > + debugfs_create_atomic_t("pool_pages", S_IRUGO, > + zswap_debugfs_root, &zswap_pool_pages); > + debugfs_create_atomic_t("stored_pages", S_IRUGO, > + zswap_debugfs_root, &zswap_stored_pages); > + > + return 0; > +} > + > +static void __exit zswap_debugfs_exit(void) > +{ > + if (zswap_debugfs_root) > + debugfs_remove_recursive(zswap_debugfs_root); > +} > +#else > +static inline int __init zswap_debugfs_init(void) > +{ > + return 0; > +} > + > +static inline void __exit zswap_debugfs_exit(void) { } > +#endif > + > +/* > +* module init and exit > +**/ > +static int __init init_zswap(void) > +{ > + if (!zswap_enabled) > + return 0; > + > + pr_info("loading zswap\n"); > + if (zswap_entry_cache_create()) { > + pr_err("zswap: entry cache creation failed\n"); > + goto error; > + } > + if (zswap_page_pool_create()) { > + pr_err("zswap: page pool initialization failed\n"); > + goto pagepoolfail; > + } > + if (zswap_comp_init()) { > + pr_err("zswap: compressor initialization failed\n"); > + goto compfail; > + } > + if (zswap_cpu_init()) { > + pr_err("zswap: per-cpu initialization failed\n"); > + goto pcpufail; > + } > + frontswap_register_ops(&zswap_frontswap_ops); > + if (zswap_debugfs_init()) > + pr_warn("zswap: debugfs initialization failed\n"); > + return 0; > +pcpufail: > + zswap_comp_exit(); > +compfail: > + zswap_page_pool_destroy(); > +pagepoolfail: > + zswap_entry_cache_destory(); > +error: > + return -ENOMEM; > +} > +/* must be late so crypto has time to come up */ > +late_initcall(init_zswap); > + > +MODULE_LICENSE("GPL"); > +MODULE_AUTHOR("Seth Jennings "); > +MODULE_DESCRIPTION("Compression backend for frontswap pages"); > -- > 1.8.1.1 > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majord...@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: mailto:"d...@kvack.org";> em...@kvack.org -- Kind regards, Minchan Kim -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCHv4 3/7] zswap: add to mm/

2013-01-31 Thread Minchan Kim
On Thu, Jan 31, 2013 at 01:06:46PM -0600, Seth Jennings wrote: > On 01/31/2013 01:07 AM, Minchan Kim wrote: > > On Tue, Jan 29, 2013 at 03:40:23PM -0600, Seth Jennings wrote: > >> zswap is a thin compression backend for frontswap. It receives > >> pages from frontswap an

Re: [PATCHv4 6/7] zswap: add flushing support

2013-01-31 Thread Minchan Kim
(!zswap_debugfs_root) > return -ENOMEM; > > + debugfs_create_u64("saved_by_flush", S_IRUGO, > + zswap_debugfs_root, &zswap_saved_by_flush); > debugfs_create_u64("pool_limit_hit", S_IRUGO, >

Re: [RFC/PATCH] scripts/tracing: Add trace_analyze.py tool

2013-01-24 Thread Minchan Kim
On Thu, Jan 24, 2013 at 02:16:35PM -0300, Ezequiel Garcia wrote: > On Thu, Jan 24, 2013 at 2:50 AM, Minchan Kim wrote: > > On Wed, Jan 23, 2013 at 06:37:56PM -0300, Ezequiel Garcia wrote: > > > >> > >> > 2. Does it support alloc_pages family? > >> >

Re: [PATCHv2 1/9] staging: zsmalloc: add gfp flags to zs_create_pool

2013-01-24 Thread Minchan Kim
x27;m not strong against but I would like know why we should call frontswap_init under swap_lock? Is there special reason? Thanks. -- Kind regards, Minchan Kim -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.k

[RESEND PATCH v5 3/4] zram: give up lazy initialization of zram metadata

2013-01-27 Thread Minchan Kim
20, it could consume 6% of ram but efficieny of zram will cover the waste. So this patch gives up lazy initialization and instead we initialize metadata at disksize setting time. Cc: Jerome Marchand Acked-by: Nitin Gupta Signed-off-by: Minchan Kim --- drivers/staging/zram/zram_d

[RESEND PATCH v5 4/4] zram: get rid of lockdep warning

2013-01-27 Thread Minchan Kim
Marchand Acked-by: Nitin Gupta Signed-off-by: Minchan Kim --- drivers/staging/zram/zram_drv.c | 189 +++-- drivers/staging/zram/zram_drv.h | 12 ++- drivers/staging/zram/zram_sysfs.c | 11 ++- 3 files changed, 116 insertions(+), 96 deletions(-) diff --git a

[RESEND PATCH v5 1/4] zram: Fix deadlock bug in partial write

2013-01-27 Thread Minchan Kim
Now zram allocates new page with GFP_KERNEL in zram I/O path if IO is partial. Unfortunately, It may cuase deadlock with reclaim path so this patch solves the problem. Cc: sta...@vger.kernel.org Cc: Jerome Marchand Acked-by: Nitin Gupta Signed-off-by: Minchan Kim --- drivers/staging/zram

[RESEND PATCH v5 2/4] zram: force disksize setting before using zram

2013-01-27 Thread Minchan Kim
ades zram. Apparently it could be a problem if zram is mainline but it still lives in staging so behavior could be changed for right way to go. Let them excuse. Cc: Jerome Marchand Acked-by: Nitin Gupta Acked-by: Dan Magenheimer Signed-off-by: Minchan Kim --- drivers/staging/zram/zram.txt |

[PATCH] zsmalloc: Fix TLB coherency and build problem

2013-01-27 Thread Minchan Kim
e loss shoud be void. [1] f553646, zsmalloc: add page table mapping method [2] https://github.com/spartacus06/zsmapbench Cc: sta...@vger.kernel.org Cc: Dan Magenheimer Cc: Russell King Cc: Konrad Rzeszutek Wilk Cc: Nitin Gupta Cc: Seth Jennings Reported-by: Matt Sealey Signed-off-by: Minchan

Re: [PATCHv2 1/9] staging: zsmalloc: add gfp flags to zs_create_pool

2013-01-27 Thread Minchan Kim
On Fri, Jan 25, 2013 at 07:56:29AM -0800, Dan Magenheimer wrote: > > From: Seth Jennings [mailto:sjenn...@linux.vnet.ibm.com] > > Subject: Re: [PATCHv2 1/9] staging: zsmalloc: add gfp flags to > > zs_create_pool > > > > On 01/24/2013 07:33 PM, Minchan Kim wrote:

Re: [PATCH 1/4] staging: zsmalloc: add gfp flags to zs_create_pool

2013-01-27 Thread Minchan Kim
; -unsigned long zs_malloc(struct zs_pool *pool, size_t size); > +unsigned long zs_malloc(struct zs_pool *pool, size_t size, gfp_t flags); > void zs_free(struct zs_pool *pool, unsigned long obj); > > void *zs_map_object(struct zs_pool *pool, unsigned long handle, > -- > 1.7.9.5 >

Re: [PATCH 2/4] staging: zsmalloc: remove unused pool name

2013-01-27 Thread Minchan Kim
On Fri, Jan 25, 2013 at 11:46:16AM -0600, Seth Jennings wrote: > zs_create_pool() currently takes a name argument which is > never used in any useful way. > > This patch removes it. > > Acked-by: Nitin Gupta > Signed-off-by: Seth Jennnings Acked-by: Minchan Kim -- Kind

Re: [PATCH 3/4] staging: zsmalloc: add page alloc/free callbacks

2013-01-27 Thread Minchan Kim
; If the user does not wish to control this, alloc_page() and > __free_page() are used by default. > > Acked-by: Nitin Gupta > Signed-off-by: Seth Jennings Acked-by: Minchan Kim -- Kind regards, Minchan Kim -- To unsubscribe from this list: send the line "unsubscribe linux-

Re: [PATCH 4/4] staging: zsmalloc: make CLASS_DELTA relative to PAGE_SIZE

2013-01-27 Thread Minchan Kim
; This patch makes ZS_SIZE_CLASS_DELTA relative to PAGE_SIZE > so that regardless of the page size, there will be the same > number of classes. > > Acked-by: Nitin Gupta > Signed-off-by: Seth Jennings Acked-by: Minchan Kim -- Kind regards, Minchan Kim -- To unsubscribe from this list: send the l

  1   2   3   4   5   6   7   8   9   10   >