Re: [PATCH 9/9] zsmalloc: remove the zsmalloc file system

2021-03-09 Thread Minchan Kim
On Tue, Mar 09, 2021 at 04:53:48PM +0100, Christoph Hellwig wrote: > Just use the generic anon_inode file system. > > Signed-off-by: Christoph Hellwig Acked-by: Minchan Kim ___ Virtualization mailing list Virtualization@lists.linux-found

Re: [PATCH 1/9] fs: rename alloc_anon_inode to alloc_anon_inode_sb

2021-03-09 Thread Minchan Kim
On Tue, Mar 09, 2021 at 04:53:40PM +0100, Christoph Hellwig wrote: > Rename alloc_inode to free the name for a new variant that does not > need boilerplate to create a super_block first. > > Signed-off-by: Christoph Hellwig > --- > arch/powerpc/platforms/pseries/cmm.c | 2 +- >

Re: [External] Re: [PATCH] mm: proc: add Sock to /proc/meminfo

2020-10-16 Thread Minchan Kim
On Fri, Oct 16, 2020 at 05:38:26PM +0200, Vlastimil Babka wrote: > On 10/13/20 10:09 AM, Mike Rapoport wrote: > > > We are not complaining about TCP using too much memory, but how do > > > we know that TCP uses a lot of memory. When I firstly face this problem, > > > I do not know who uses the

Re: [PATCH] mm balloon: umount balloon_mnt when remove vb device

2017-02-08 Thread Minchan Kim
uot;mm: balloon: use general non-lru movable page feature") > Signed-off-by: Yisheng Xie <xieyishe...@huawei.com> Thanks for the fixing! Acked-by: Minchan Kim <minc...@kernel.org> ___ Virtualization mailing list Virtual

Re: [PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration

2016-06-30 Thread Minchan Kim
On Thu, Jun 30, 2016 at 11:26:45AM +0530, Anshuman Khandual wrote: > >> Did you get a chance to test the driver out ? I am still concerned about > >> how to > >> handle the struct address_space override problem within the struct page. > > > > Hi Anshuman, > > > > Slow but I am working on

Re: [PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration

2016-06-28 Thread Minchan Kim
On Mon, Jun 27, 2016 at 11:21:01AM +0530, Anshuman Khandual wrote: > On 06/16/2016 11:07 AM, Minchan Kim wrote: > > On Thu, Jun 16, 2016 at 09:12:07AM +0530, Anshuman Khandual wrote: > >> On 06/16/2016 05:56 AM, Minchan Kim wrote: > >>> On Wed, Jun 15, 2016 at 12:15

Re: [PATCH v7 00/12] Support non-lru page migration

2016-06-16 Thread Minchan Kim
On Thu, Jun 16, 2016 at 05:42:11PM +0900, Sergey Senozhatsky wrote: > On (06/16/16 15:47), Minchan Kim wrote: > > > [..] > > > > > this is what I'm getting with the [zsmalloc: keep first object offset > > > > > in struct page] > > > > > ap

Re: [PATCH v7 00/12] Support non-lru page migration

2016-06-16 Thread Minchan Kim
On Thu, Jun 16, 2016 at 02:22:09PM +0900, Sergey Senozhatsky wrote: > On (06/16/16 13:47), Minchan Kim wrote: > [..] > > > this is what I'm getting with the [zsmalloc: keep first object offset in > > > struct page] > > > applied: "count:0 mapcount:-127&

Re: [PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration

2016-06-15 Thread Minchan Kim
On Thu, Jun 16, 2016 at 09:12:07AM +0530, Anshuman Khandual wrote: > On 06/16/2016 05:56 AM, Minchan Kim wrote: > > On Wed, Jun 15, 2016 at 12:15:04PM +0530, Anshuman Khandual wrote: > >> On 06/15/2016 08:02 AM, Minchan Kim wrote: > >>> Hi, > >>> >

Re: [PATCH v7 00/12] Support non-lru page migration

2016-06-15 Thread Minchan Kim
On Thu, Jun 16, 2016 at 01:23:43PM +0900, Sergey Senozhatsky wrote: > On (06/16/16 11:58), Minchan Kim wrote: > [..] > > RAX: 2065676162726166 so rax is totally garbage, I think. > > It means obj_to_head returns garbage because get_first_obj_offset is > > utter crab b

Re: [PATCH v7 00/12] Support non-lru page migration

2016-06-15 Thread Minchan Kim
On Thu, Jun 16, 2016 at 11:48:27AM +0900, Sergey Senozhatsky wrote: > Hi, > > On (06/16/16 08:12), Minchan Kim wrote: > > > [ 315.146533] kasan: CONFIG_KASAN_INLINE enabled > > > [ 315.146538] kasan: GPF could be caused by NULL-ptr deref or user > > > memory

Re: [PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration

2016-06-15 Thread Minchan Kim
On Wed, Jun 15, 2016 at 12:15:04PM +0530, Anshuman Khandual wrote: > On 06/15/2016 08:02 AM, Minchan Kim wrote: > > Hi, > > > > On Mon, Jun 13, 2016 at 03:08:19PM +0530, Anshuman Khandual wrote: > >> > On 05/31/2016 05:31 AM, Minchan Kim wrote: > &g

Re: [PATCH v7 00/12] Support non-lru page migration

2016-06-15 Thread Minchan Kim
Hi Sergey, On Wed, Jun 15, 2016 at 04:59:09PM +0900, Sergey Senozhatsky wrote: > Hello Minchan, > > -next 4.7.0-rc3-next-20160614 > > > [ 315.146533] kasan: CONFIG_KASAN_INLINE enabled > [ 315.146538] kasan: GPF could be caused by NULL-ptr deref or user memory > access > [ 315.146546]

Re: [PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration

2016-06-14 Thread Minchan Kim
Hi, On Mon, Jun 13, 2016 at 03:08:19PM +0530, Anshuman Khandual wrote: > On 05/31/2016 05:31 AM, Minchan Kim wrote: > > @@ -791,6 +921,7 @@ static int __unmap_and_move(struct page *page, struct > > page *newpage, > > int rc = -EAGAIN; > > int page_was_mapped =

Re: [PATCH v7 00/12] Support non-lru page migration

2016-06-01 Thread Minchan Kim
On Wed, Jun 01, 2016 at 02:41:51PM -0700, Andrew Morton wrote: > On Wed, 1 Jun 2016 08:21:09 +0900 Minchan Kim <minc...@kernel.org> wrote: > > > Recently, I got many reports about perfermance degradation in embedded > > system(Android mobile phone, webOS TV and s

[PATCH v7 02/12] mm: migrate: support non-lru movable page migration

2016-05-31 Thread Minchan Kim
astimil Babka <vba...@suse.cz> Signed-off-by: Gioh Kim <gi-oh@profitbricks.com> Signed-off-by: Minchan Kim <minc...@kernel.org> --- Documentation/filesystems/Locking | 4 + Documentation/filesystems/vfs.txt | 11 +++ Documentation/vm/page_migration | 107 +++

[PATCH v7 03/12] mm: balloon: use general non-lru movable page feature

2016-05-31 Thread Minchan Kim
migration functions and make balloon compaction simple. Cc: virtualization@lists.linux-foundation.org Cc: Rafael Aquini <aqu...@redhat.com> Cc: Konstantin Khlebnikov <koc...@gmail.com> Acked-by: Vlastimil Babka <vba...@suse.cz> Signed-off-by: Gioh Kim <gi-oh@profitbricks.com>

[PATCH v7 00/12] Support non-lru page migration

2016-05-31 Thread Minchan Kim
..@lge.com> Cc: Kyeongdon Kim <kyeongdon@lge.com> Cc: Chulmin Kim <cmlaika@samsung.com> Minchan Kim (12): mm: use put_page to free page instead of putback_lru_page mm: migrate: support non-lru movable page migration mm: balloon: use general non-lru movable page featur

Re: [PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration

2016-05-31 Thread Minchan Kim
On Tue, May 31, 2016 at 09:52:48AM +0200, Vlastimil Babka wrote: > On 05/31/2016 02:01 AM, Minchan Kim wrote: > >Per Vlastimi's review comment. > > > >Thanks for the detail review, Vlastimi! > >If you have another concern, feel free to say. > > I don't for now :)

[PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration

2016-05-30 Thread Minchan Kim
Per Vlastimi's review comment. Thanks for the detail review, Vlastimi! If you have another concern, feel free to say. After I resolve all thing, I will send v7 rebased on recent mmotm. >From b14aab2d3ac0702c7b2eec36409d74406d43 Mon Sep 17 00:00:00 2001 From: Minchan Kim <minc...@kern

Re: PATCH v6v2 02/12] mm: migrate: support non-lru movable page migration

2016-05-30 Thread Minchan Kim
On Mon, May 30, 2016 at 11:36:07AM +0200, Vlastimil Babka wrote: > On 05/30/2016 03:39 AM, Minchan Kim wrote: > >After isolation, VM calls migratepage of driver with isolated page. > >The function of migratepage is to move content of the old page to new page > >and set up

PATCH v6v2 02/12] mm: migrate: support non-lru movable page migration

2016-05-29 Thread Minchan Kim
Per Vlastimil's review comment, Vlastimil, I updated based on your comment. Please review this. If everything is done, I will send v7 rebased on recent mmotm. Thanks for the review! >From ad4157e98651a2d18fd0a4ae90d1d9f609aab314 Mon Sep 17 00:00:00 2001 From: Minchan Kim <minc...@kern

Re: [PATCH v6 02/12] mm: migrate: support non-lru movable page migration

2016-05-29 Thread Minchan Kim
On Fri, May 27, 2016 at 04:26:21PM +0200, Vlastimil Babka wrote: > On 05/20/2016 04:23 PM, Minchan Kim wrote: > >We have allowed migration for only LRU pages until now and it was > >enough to make high-order pages. But recently, embedded system(e.g., > >webOS, android) use

[PATCH v6 03/12] mm: balloon: use general non-lru movable page feature

2016-05-20 Thread Minchan Kim
migration functions and make balloon compaction simple. Cc: virtualization@lists.linux-foundation.org Cc: Rafael Aquini <aqu...@redhat.com> Cc: Konstantin Khlebnikov <koc...@gmail.com> Signed-off-by: Gioh Kim <gi-oh@profitbricks.com> Signed-off-by: Minchan Kim <minc...@k

[PATCH v6 02/12] mm: migrate: support non-lru movable page migration

2016-05-20 Thread Minchan Kim
u...@google.com> Cc: Rafael Aquini <aqu...@redhat.com> Cc: virtualization@lists.linux-foundation.org Cc: Jonathan Corbet <cor...@lwn.net> Cc: John Einar Reitan <john.rei...@foss.arm.com> Cc: dri-de...@lists.freedesktop.org Cc: Sergey Senozhatsky <sergey.senozhat...

[PATCH v6 00/12] Support non-lru page migration

2016-05-20 Thread Minchan Kim
gmail.com> Cc: virtualization@lists.linux-foundation.org Cc: Gioh Kim <gi-oh@profitbricks.com> Cc: Chan Gyun Jeong <chan.je...@lge.com> Cc: Sangseok Lee <sangseok@lge.com> Cc: Kyeongdon Kim <kyeongdon@lge.com> Cc: Chulmin Kim <cmlaika@samsung.com> Minchan Kim

Re: [PATCH v5 02/12] mm: migrate: support non-lru movable page migration

2016-05-16 Thread Minchan Kim
On Mon, May 16, 2016 at 04:17:51PM +0900, Sergey Senozhatsky wrote: > On (05/09/16 11:20), Minchan Kim wrote: > [..] > > +++ b/include/linux/migrate.h > > @@ -32,11 +32,16 @@ extern char *migrate_reason_names[MR_TYPES]; > > > > #ifdef CONFIG_MIGRATION > >

Re: [PATCH v5 02/12] mm: migrate: support non-lru movable page migration

2016-05-16 Thread Minchan Kim
On Mon, May 16, 2016 at 04:04:55PM +0900, Sergey Senozhatsky wrote: > On (05/09/16 11:20), Minchan Kim wrote: > > +++ b/include/linux/migrate.h > > @@ -32,11 +32,16 @@ extern char *migrate_reason_names[MR_TYPES]; > > > > #ifdef CONFIG_MIGRATION > > > &

[PATCH v5 02/12] mm: migrate: support non-lru movable page migration

2016-05-08 Thread Minchan Kim
: Hugh Dickins <hu...@google.com> Cc: Rafael Aquini <aqu...@redhat.com> Cc: virtualization@lists.linux-foundation.org Cc: Jonathan Corbet <cor...@lwn.net> Cc: John Einar Reitan <john.rei...@foss.arm.com> Cc: dri-de...@lists.freedesktop.org Cc: Sergey Senozhatsky <sergey.senoz

[PATCH v5 00/13] Support non-lru page migration

2016-05-08 Thread Minchan Kim
t.com> Cc: Rik van Riel <r...@redhat.com> Cc: Sergey Senozhatsky <sergey.senozhat...@gmail.com> Cc: virtualization@lists.linux-foundation.org Cc: Gioh Kim <gi-oh@profitbricks.com> Cc: Chan Gyun Jeong <chan.je...@lge.com> Cc: Sangseok Lee <sangseok@lge.com> Cc:

[PATCH v5 03/12] mm: balloon: use general non-lru movable page feature

2016-05-08 Thread Minchan Kim
migration functions and make balloon compaction simple. Cc: virtualization@lists.linux-foundation.org Cc: Rafael Aquini <aqu...@redhat.com> Cc: Konstantin Khlebnikov <koc...@gmail.com> Signed-off-by: Gioh Kim <gi-oh@profitbricks.com> Signed-off-by: Minchan Kim <minc...@k

Re: [PATCH v4 00/13] Support non-lru page migration

2016-04-27 Thread Minchan Kim
Hello Andrew, On Wed, Apr 27, 2016 at 01:20:35PM -0700, Andrew Morton wrote: > On Wed, 27 Apr 2016 16:48:13 +0900 Minchan Kim <minc...@kernel.org> wrote: > > > Recently, I got many reports about perfermance degradation in embedded > > system(Android mobile phone, webO

[PATCH v4 00/13] Support non-lru page migration

2016-04-27 Thread Minchan Kim
om> Cc: Sangseok Lee <sangseok@lge.com> Cc: Kyeongdon Kim <kyeongdon@lge.com> Cc: Chulmin Kim <cmlaika@samsung.com> Minchan Kim (12): mm: use put_page to free page instead of putback_lru_page mm: migrate: support non-lru movable page migration mm: balloon: use

[PATCH v4 02/12] mm: migrate: support non-lru movable page migration

2016-04-27 Thread Minchan Kim
: Hugh Dickins <hu...@google.com> Cc: Rafael Aquini <aqu...@redhat.com> Cc: virtualization@lists.linux-foundation.org Cc: Jonathan Corbet <cor...@lwn.net> Cc: John Einar Reitan <john.rei...@foss.arm.com> Cc: dri-de...@lists.freedesktop.org Cc: Sergey Senozhatsky <sergey.senoz

[PATCH v4 03/12] mm: balloon: use general non-lru movable page feature

2016-04-27 Thread Minchan Kim
migration functions and make balloon compaction simple. Cc: virtualization@lists.linux-foundation.org Cc: Rafael Aquini <aqu...@redhat.com> Cc: Konstantin Khlebnikov <koc...@gmail.com> Signed-off-by: Gioh Kim <gi-oh@profitbricks.com> Signed-off-by: Minchan Kim <minc...@k

Re: [PATCH v3 11/16] zsmalloc: separate free_zspage from putback_zspage

2016-04-19 Thread Minchan Kim
Hi Sergey, On Mon, Apr 18, 2016 at 10:04:08AM +0900, Sergey Senozhatsky wrote: > Hello Minchan, > > On (03/30/16 16:12), Minchan Kim wrote: > [..] > > @@ -1835,23 +1827,31 @@ static void __zs_compact(struct zs_pool *pool, > > struct size_class *class) > >

Re: [PATCH v3 10/16] zsmalloc: factor page chain functionality out

2016-04-19 Thread Minchan Kim
On Mon, Apr 18, 2016 at 09:33:05AM +0900, Sergey Senozhatsky wrote: > Hello, > > On (03/30/16 16:12), Minchan Kim wrote: > > @@ -1421,7 +1434,6 @@ static unsigned long obj_malloc(struct size_class > > *class, > > unsigned long m_offset; > >

Re: [PATCH v3 08/16] zsmalloc: squeeze freelist into page->mapping

2016-04-19 Thread Minchan Kim
On Mon, Apr 18, 2016 at 12:56:21AM +0900, Sergey Senozhatsky wrote: > Hello, > > On (03/30/16 16:12), Minchan Kim wrote: > [..] > > +static void objidx_to_page_and_offset(struct size_class *class, > > + struct page *first_page, > > +

Re: [PATCH v3 06/16] zsmalloc: squeeze inuse into page->mapping

2016-04-19 Thread Minchan Kim
On Mon, Apr 18, 2016 at 12:08:04AM +0900, Sergey Senozhatsky wrote: > Hello, > > On (03/30/16 16:12), Minchan Kim wrote: > [..] > > +static int get_zspage_inuse(struct page *first_page) > > +{ > > + struct zs_meta *m; > > + > > + VM_BUG_ON_P

Re: [PATCH v3 00/16] Support non-lru page migration

2016-04-10 Thread Minchan Kim
On Mon, Apr 04, 2016 at 03:17:18PM +0200, John Einar Reitan wrote: > On Wed, Mar 30, 2016 at 04:11:59PM +0900, Minchan Kim wrote: > > Recently, I got many reports about perfermance degradation > > in embedded system(Android mobile phone, webOS TV and so on) > > and

Re: [PATCH v3 04/16] mm/balloon: use general movable page feature into balloon

2016-04-10 Thread Minchan Kim
On Tue, Apr 05, 2016 at 02:03:05PM +0200, Vlastimil Babka wrote: > On 03/30/2016 09:12 AM, Minchan Kim wrote: > >Now, VM has a feature to migrate non-lru movable pages so > >balloon doesn't need custom migration hooks in migrate.c > >and compact.c. Instead, this patch imp

Re: [PATCH v3 02/16] mm/compaction: support non-lru movable page migration

2016-04-06 Thread Minchan Kim
On Mon, Apr 04, 2016 at 03:24:34PM +0200, Vlastimil Babka wrote: > On 04/04/2016 07:12 AM, Minchan Kim wrote: > >On Fri, Apr 01, 2016 at 11:29:14PM +0200, Vlastimil Babka wrote: > >>Might have been better as a separate migration patch and then a > >>compaction patch.

Re: [PATCH v3 03/16] mm: add non-lru movable page support document

2016-04-06 Thread Minchan Kim
On Mon, Apr 04, 2016 at 03:09:22PM +0200, Vlastimil Babka wrote: > On 04/04/2016 04:25 AM, Minchan Kim wrote: > >> > >>Ah, I see, so it's designed with page lock to handle the concurrent > >>isolations etc. > >> > >>In http://marc.info/?l=linux-mm=

Re: [PATCH v3 01/16] mm: use put_page to free page instead of putback_lru_page

2016-04-04 Thread Minchan Kim
On Mon, Apr 04, 2016 at 03:53:59PM +1000, Balbir Singh wrote: > > > On 30/03/16 18:12, Minchan Kim wrote: > > Procedure of page migration is as follows: > > > > First of all, it should isolate a page from LRU and try to > > migrate the page. If it is

mm/hwpoison: fix wrong num_poisoned_pages account

2016-04-03 Thread Minchan Kim
Forking new thread, Hello Naoya, On Mon, Apr 04, 2016 at 04:45:12AM +, Naoya Horiguchi wrote: > On Mon, Apr 04, 2016 at 10:39:17AM +0900, Minchan Kim wrote: > > On Fri, Apr 01, 2016 at 02:58:21PM +0200, Vlastimil Babka wrote: > > > On 03/30/2016 09:12 AM, Minchan Kim wrote

Re: [PATCH v3 02/16] mm/compaction: support non-lru movable page migration

2016-04-03 Thread Minchan Kim
good idea to separate compaction and migration part. I will just resend to change the tile from "mm/compaction" to "mm/migration". > > On 03/30/2016 09:12 AM, Minchan Kim wrote: > >We have allowed migration for only LRU pages until now and it was > >enough to make high

Re: [PATCH v3 03/16] mm: add non-lru movable page support document

2016-04-03 Thread Minchan Kim
On Fri, Apr 01, 2016 at 04:38:34PM +0200, Vlastimil Babka wrote: > On 03/30/2016 09:12 AM, Minchan Kim wrote: > >This patch describes what a subsystem should do for non-lru movable > >page supporting. > > Intentionally reading this first without studying the code to

Re: [PATCH v3 01/16] mm: use put_page to free page instead of putback_lru_page

2016-04-03 Thread Minchan Kim
On Fri, Apr 01, 2016 at 02:58:21PM +0200, Vlastimil Babka wrote: > On 03/30/2016 09:12 AM, Minchan Kim wrote: > >Procedure of page migration is as follows: > > > >First of all, it should isolate a page from LRU and try to > >migrate the page. If it is succe

Re: [PATCH v3 00/16] Support non-lru page migration

2016-03-30 Thread Minchan Kim
On Thu, Mar 31, 2016 at 09:29:32AM +0900, Sergey Senozhatsky wrote: > On (03/30/16 16:11), Andrew Morton wrote: > [..] > > > For details, please read description in > > > "mm/compaction: support non-lru movable page migration". > > > > OK, I grabbed all these. > > > > I wonder about testing

Re: [PATCH v3 00/16] Support non-lru page migration

2016-03-30 Thread Minchan Kim
On Wed, Mar 30, 2016 at 04:11:41PM -0700, Andrew Morton wrote: > On Wed, 30 Mar 2016 16:11:59 +0900 Minchan Kim <minc...@kernel.org> wrote: > > > Recently, I got many reports about perfermance degradation > > in embedded system(Android mobile phone, webOS TV and so on

[PATCH v3 12/16] zsmalloc: zs_compact refactoring

2016-03-30 Thread Minchan Kim
ocated objects in the zspage with pinning tag so user cannot free using object. With those functions, this patch redesign compaction. Those functions will be used for implementing zspage runtime migrations, too. Signed-off-by: Minchan Kim <minc...@kernel.org> --- mm/zsma

[PATCH v3 13/16] zsmalloc: migrate head page of zspage

2016-03-30 Thread Minchan Kim
, too right before calling ->migratepage so such race doesn't exist any more. Signed-off-by: Minchan Kim <minc...@kernel.org> --- include/uapi/linux/magic.h | 1 + mm/zsmalloc.c | 332 +++-- 2 files changed, 318 insertions(+), 15

[PATCH v3 16/16] zram: use __GFP_MOVABLE for memory allocation

2016-03-30 Thread Minchan Kim
.senozhat...@gmail.com> Signed-off-by: Minchan Kim <minc...@kernel.org> --- drivers/block/zram/zram_drv.c | 3 ++- mm/zsmalloc.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c

[PATCH v3 08/16] zsmalloc: squeeze freelist into page->mapping

2016-03-30 Thread Minchan Kim
Zsmalloc stores first free object's position into first_page->freelist in each zspage. If we change it with object index from first_page instead of location, we could squeeze it into page->mapping because the number of bit we need to store offset is at most 11bit. Signed-off-by: Minchan Kim

[PATCH v3 15/16] zsmalloc: migrate tail pages in zspage

2016-03-30 Thread Minchan Kim
of this feature and realworkload overhead(i.e., most overhead comes from compression). Signed-off-by: Minchan Kim <minc...@kernel.org> --- mm/zsmalloc.c | 129 +++--- 1 file changed, 114 insertions(+), 15 deletions(-) diff --git a/mm/zsmalloc.

[PATCH v3 06/16] zsmalloc: squeeze inuse into page->mapping

2016-03-30 Thread Minchan Kim
could squeeze inuse object count to page->mapping. Signed-off-by: Minchan Kim <minc...@kernel.org> --- mm/zsmalloc.c | 103 -- 1 file changed, 71 insertions(+), 32 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c ind

[PATCH v3 10/16] zsmalloc: factor page chain functionality out

2016-03-30 Thread Minchan Kim
-by: Minchan Kim <minc...@kernel.org> --- mm/zsmalloc.c | 80 ++- 1 file changed, 46 insertions(+), 34 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index d4d33a819832..14bcc741eead 100644 --- a/mm/zsmalloc.c +++ b/mm/zsma

[PATCH v3 14/16] zsmalloc: use single linked list for page chain

2016-03-30 Thread Minchan Kim
placed in run-time calculation. So, this patch change page->lru list for chaining with singly linked list via page->freelist squeeze and introduces get_first_obj_ofs to get first object offset in a page. With that, it could maintain page chaining without using page->lru. Signed-off-

[PATCH v3 11/16] zsmalloc: separate free_zspage from putback_zspage

2016-03-30 Thread Minchan Kim
zspage migration. Signed-off-by: Minchan Kim <minc...@kernel.org> --- mm/zsmalloc.c | 46 +++--- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 14bcc741eead..b11dcd718502 100644 --- a/mm/zsmalloc.c +++ b/m

[PATCH v3 04/16] mm/balloon: use general movable page feature into balloon

2016-03-30 Thread Minchan Kim
ctions and make balloon compaction simple. Cc: virtualization@lists.linux-foundation.org Cc: Rafael Aquini <aqu...@redhat.com> Cc: Konstantin Khlebnikov <koc...@gmail.com> Signed-off-by: Gioh Kim <guru...@hanmail.net> Signed-off-by: Minchan Kim <minc...@kernel.org> --- d

[PATCH v3 09/16] zsmalloc: move struct zs_meta from mapping to freelist

2016-03-30 Thread Minchan Kim
For supporting migration from VM, we need to have address_space on every page so zsmalloc shouldn't use page->mapping. So, this patch moves zs_meta from mapping to freelist. Signed-off-by: Minchan Kim <minc...@kernel.org> --- mm/zsmalloc.c | 22 +++--- 1 file ch

[PATCH v3 07/16] zsmalloc: remove page_mapcount_reset

2016-03-30 Thread Minchan Kim
We don't use page->_mapcount any more so no need to reset. Signed-off-by: Minchan Kim <minc...@kernel.org> --- mm/zsmalloc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 4dd72a803568..0f6cce9b9119 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c

[PATCH v3 02/16] mm/compaction: support non-lru movable page migration

2016-03-30 Thread Minchan Kim
se.de> Cc: Hugh Dickins <hu...@google.com> Cc: dri-de...@lists.freedesktop.org Cc: virtualization@lists.linux-foundation.org Signed-off-by: Gioh Kim <guru...@hanmail.net> Signed-off-by: Minchan Kim <minc...@kernel.org> --- Documentation/filesystems/Locking | 4 + Document

[PATCH v3 03/16] mm: add non-lru movable page support document

2016-03-30 Thread Minchan Kim
This patch describes what a subsystem should do for non-lru movable page supporting. Cc: Jonathan Corbet <cor...@lwn.net> Signed-off-by: Minchan Kim <minc...@kernel.org> --- Documentation/filesystems/vfs.txt | 11 ++- Documentation/vm/page_migr

[PATCH v3 05/16] zsmalloc: keep max_object in size_class

2016-03-30 Thread Minchan Kim
Every zspage in a size_class has same number of max objects so we could move it to a size_class. Signed-off-by: Minchan Kim <minc...@kernel.org> --- mm/zsmalloc.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsma

[PATCH v3 01/16] mm: use put_page to free page instead of putback_lru_page

2016-03-30 Thread Minchan Kim
ction (perhaps also other migration users) has to drain the lru pvec... Getting rid of this stuff is worth even by itself." Cc: Mel Gorman <mgor...@suse.de> Cc: Hugh Dickins <hu...@google.com> Cc: Naoya Horiguchi <n-horigu...@ah.jp.nec.com> Acked-by: Vlastimil Babka <vba...@suse

[PATCH v3 00/16] Support non-lru page migration

2016-03-30 Thread Minchan Kim
2016-03-17-15-04 * reordering patches to merge clean-up patches first * add Acked-by/Reviewed-by from Vlastimil and Sergey * use each own mount model instead of reusing anon_inode_fs - Al Viro * small changes - YiPing, Gioh Minchan Kim (16): mm: use put_page to free page instead of putba

Re: [PATCH v2 00/18] Support non-lru page migration

2016-03-27 Thread Minchan Kim
Hello Andrew, On Mon, Mar 21, 2016 at 03:30:49PM +0900, Minchan Kim wrote: > Recently, I got many reports about perfermance degradation > in embedded system(Android mobile phone, webOS TV and so on) > and failed to fork easily. > > The problem was fragmentation caused by zram

Re: Re: [PATCH v2 13/18] mm/compaction: support non-lru movable pagemigration

2016-03-23 Thread Minchan Kim
On Thu, Mar 24, 2016 at 05:26:50AM +0900, Gioh Kim wrote: >Hmmm... But, in failure case, is it safe to call putback_lru_page() for >them? >And, PageIsolated() would be left. Is it okay? It's not symmetric that >isolated page can be freed by decreasing ref count without calling >

Re: [PATCH v2 13/18] mm/compaction: support non-lru movable page migration

2016-03-23 Thread Minchan Kim
On Wed, Mar 23, 2016 at 02:05:11PM +0900, Joonsoo Kim wrote: > On Tue, Mar 22, 2016 at 11:55:45PM +0900, Minchan Kim wrote: > > On Tue, Mar 22, 2016 at 02:50:37PM +0900, Joonsoo Kim wrote: > > > On Mon, Mar 21, 2016 at 03:31:02PM +0900, Minchan Kim wrote: > > > > We h

Re: [PATCH v2 13/18] mm/compaction: support non-lru movable page migration

2016-03-22 Thread Minchan Kim
On Tue, Mar 22, 2016 at 02:50:37PM +0900, Joonsoo Kim wrote: > On Mon, Mar 21, 2016 at 03:31:02PM +0900, Minchan Kim wrote: > > We have allowed migration for only LRU pages until now and it was > > enough to make high-order pages. But recently, embedded system(e.g., > > webO

Re: [PATCH] zsmalloc: fix semicolon.cocci warnings

2016-03-21 Thread Minchan Kim
On Mon, Mar 21, 2016 at 05:48:25PM +0800, kbuild test robot wrote: > mm/zsmalloc.c:1103:2-3: Unneeded semicolon > > > Remove unneeded semicolon. > > Generated by: scripts/coccinelle/misc/semicolon.cocci > > CC: Minchan Kim <minc...@kernel.org> > Signe

Re: [PATCH v2 14/18] mm/balloon: use general movable page feature into balloon

2016-03-21 Thread Minchan Kim
e system] > > url: > https://github.com/0day-ci/linux/commits/Minchan-Kim/Support-non-lru-page-migration/20160321-143339 > config: x86_64-randconfig-x000-201612 (attached as .config) > reproduce: > # save the attached .config to linux build tree > make ARCH=x8

[PATCH v2 15/18] zsmalloc: migrate head page of zspage

2016-03-21 Thread Minchan Kim
, too right before calling ->migratepage so such race doesn't exist any more. Signed-off-by: Minchan Kim <minc...@kernel.org> --- include/uapi/linux/magic.h | 1 + mm/zsmalloc.c | 329 +++-- 2 files changed, 317 insertions(+), 13

[PATCH v2 14/18] mm/balloon: use general movable page feature into balloon

2016-03-21 Thread Minchan Kim
ctions and make balloon compaction simple. Cc: virtualization@lists.linux-foundation.org Cc: Rafael Aquini <aqu...@redhat.com> Cc: Konstantin Khlebnikov <koc...@gmail.com> Signed-off-by: Gioh Kim <guru...@hanmail.net> Signed-off-by: Minchan Kim <minc...@kernel.org> --- d

[PATCH v2 17/18] zsmalloc: migrate tail pages in zspage

2016-03-21 Thread Minchan Kim
of this feature and realworkload overhead(i.e., most overhead comes from compression). Signed-off-by: Minchan Kim <minc...@kernel.org> --- mm/zsmalloc.c | 131 +++--- 1 file changed, 115 insertions(+), 16 deletions(-) diff --git a/mm/zsmalloc.

[PATCH v2 13/18] mm/compaction: support non-lru movable page migration

2016-03-21 Thread Minchan Kim
oundation.org Signed-off-by: Gioh Kim <guru...@hanmail.net> Signed-off-by: Minchan Kim <minc...@kernel.org> --- Documentation/filesystems/Locking | 4 + Documentation/filesystems/vfs.txt | 5 ++ fs/proc/page.c | 3 + include/linux/fs.h

[PATCH v2 18/18] zram: use __GFP_MOVABLE for memory allocation

2016-03-21 Thread Minchan Kim
.senozhat...@gmail.com> Signed-off-by: Minchan Kim <minc...@kernel.org> --- drivers/block/zram/zram_drv.c | 3 ++- mm/zsmalloc.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c

[PATCH v2 12/18] zsmalloc: zs_compact refactoring

2016-03-21 Thread Minchan Kim
ocated objects in the zspage with pinning tag so user cannot free using object. With those functions, this patch redesign compaction. Those functions will be used for implementing zspage runtime migrations, too. Signed-off-by: Minchan Kim <minc...@kernel.org> --- mm/zsma

[PATCH v2 16/18] zsmalloc: use single linked list for page chain

2016-03-21 Thread Minchan Kim
placed in run-time calculation. So, this patch change page->lru list for chaining with singly linked list via page->freelist squeeze and introduces get_first_obj_ofs to get first object offset in a page. With that, it could maintain page chaining without using page->lru. Signed-off-

[PATCH v2 10/18] zsmalloc: factor page chain functionality out

2016-03-21 Thread Minchan Kim
-by: Minchan Kim <minc...@kernel.org> --- mm/zsmalloc.c | 80 ++- 1 file changed, 46 insertions(+), 34 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 958f27a9079d..833da8f4ffc9 100644 --- a/mm/zsmalloc.c +++ b/mm/zsma

[PATCH v2 11/18] zsmalloc: separate free_zspage from putback_zspage

2016-03-21 Thread Minchan Kim
zspage migration. Signed-off-by: Minchan Kim <minc...@kernel.org> --- mm/zsmalloc.c | 46 +++--- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 833da8f4ffc9..9c0ab1e92e9b 100644 --- a/mm/zsmalloc.c +++ b/m

[PATCH v2 09/18] zsmalloc: move struct zs_meta from mapping to freelist

2016-03-21 Thread Minchan Kim
For supporting migration from VM, we need to have address_space on every page so zsmalloc shouldn't use page->mapping. So, this patch moves zs_meta from mapping to freelist. Signed-off-by: Minchan Kim <minc...@kernel.org> --- mm/zsmalloc.c | 23 --- 1 file ch

[PATCH v2 07/18] zsmalloc: squeeze inuse into page->mapping

2016-03-21 Thread Minchan Kim
could squeeze inuse object count to page->mapping. Signed-off-by: Minchan Kim <minc...@kernel.org> --- mm/zsmalloc.c | 103 -- 1 file changed, 71 insertions(+), 32 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c ind

[PATCH v2 08/18] zsmalloc: squeeze freelist into page->mapping

2016-03-21 Thread Minchan Kim
Zsmalloc stores first free object's position into first_page->freelist in each zspage. If we change it with object index from first_page instead of location, we could squeeze it into page->mapping because the number of bit we need to store offset is at most 11bit. Signed-off-by: Minchan Kim

[PATCH v2 06/18] zsmalloc: keep max_object in size_class

2016-03-21 Thread Minchan Kim
Every zspage in a size_class has same number of max objects so we could move it to a size_class. Signed-off-by: Minchan Kim <minc...@kernel.org> --- mm/zsmalloc.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsma

[PATCH v2 03/18] zsmalloc: clean up many BUG_ON

2016-03-21 Thread Minchan Kim
so higher functions can rely on the assertion in the primitive function. 4. Don't use assertion if following instruction can trigger Oops Reviewed-by: Sergey Senozhatsky <sergey.senozhat...@gmail.com> Signed-off-by: Minchan Kim <minc...@kernel.org> --- mm/zsm

[PATCH v2 05/18] zsmalloc: remove unused pool param in obj_free

2016-03-21 Thread Minchan Kim
Let's remove unused pool param in obj_free Reviewed-by: Sergey Senozhatsky <sergey.senozhat...@gmail.com> Signed-off-by: Minchan Kim <minc...@kernel.org> --- mm/zsmalloc.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index

[PATCH v2 02/18] zsmalloc: use first_page rather than page

2016-03-21 Thread Minchan Kim
This patch cleans up function parameter "struct page". Many functions of zsmalloc expects that page paramter is "first_page" so use "first_page" rather than "page" for code readability. Reviewed-by: Sergey Senozhatsky <sergey.senozhat...@gmail.com>

[PATCH v2 04/18] zsmalloc: reordering function parameter

2016-03-21 Thread Minchan Kim
This patch cleans up function parameter ordering to order higher data structure first. Reviewed-by: Sergey Senozhatsky <sergey.senozhat...@gmail.com> Signed-off-by: Minchan Kim <minc...@kernel.org> --- mm/zsmalloc.c | 50 ++ 1 file

[PATCH v2 00/18] Support non-lru page migration

2016-03-21 Thread Minchan Kim
gey * use each own mount model instead of reusing anon_inode_fs - Al Viro * small changes - YiPing, Gioh Minchan Kim (18): mm: use put_page to free page instead of putback_lru_page zsmalloc: use first_page rather than page zsmalloc: clean up many BUG_ON zsmalloc: reordering function para

[PATCH v2 01/18] mm: use put_page to free page instead of putback_lru_page

2016-03-21 Thread Minchan Kim
ction (perhaps also other migration users) has to drain the lru pvec... Getting rid of this stuff is worth even by itself." Cc: Mel Gorman <mgor...@suse.de> Cc: Hugh Dickins <hu...@google.com> Cc: Naoya Horiguchi <n-horigu...@ah.jp.nec.com> Acked-by: Vlastimil Babka <vba...@suse

Re: [PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping

2016-03-19 Thread Minchan Kim
On Thu, Mar 17, 2016 at 08:09:50PM +0800, YiPing Xu wrote: > > > On 2016/3/15 14:51, Minchan Kim wrote: > >On Tue, Mar 15, 2016 at 03:40:53PM +0900, Sergey Senozhatsky wrote: > >>On (03/11/16 16:30), Minchan Kim wrote: > >>>-static void *location_to_obj(stru

Re: [PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping

2016-03-15 Thread Minchan Kim
On Tue, Mar 15, 2016 at 03:40:53PM +0900, Sergey Senozhatsky wrote: > On (03/11/16 16:30), Minchan Kim wrote: > > -static void *location_to_obj(struct page *page, unsigned long obj_idx) > > +static void objidx_to_page_and_ofs(struct size_class *class, > > +

Re: [PATCH v1 01/19] mm: use put_page to free page instead of putback_lru_page

2016-03-14 Thread Minchan Kim
On Mon, Mar 14, 2016 at 09:48:33AM +0100, Vlastimil Babka wrote: > On 03/11/2016 08:30 AM, Minchan Kim wrote: > >Procedure of page migration is as follows: > > > >First of all, it should isolate a page from LRU and try to > >migrate the page. If it is succe

Re: [PATCH v1 13/19] zsmalloc: factor page chain functionality out

2016-03-13 Thread Minchan Kim
On Sat, Mar 12, 2016 at 11:09:36AM +0800, xuyiping wrote: > > > On 2016/3/11 15:30, Minchan Kim wrote: > >For migration, we need to create sub-page chain of zspage > >dynamically so this patch factors it out from alloc_zspage. > > > >As a minor refactoring,

Re: [PATCH v1 09/19] zsmalloc: keep max_object in size_class

2016-03-13 Thread Minchan Kim
On Sat, Mar 12, 2016 at 09:44:48AM +0800, xuyiping wrote: > > > On 2016/3/11 15:30, Minchan Kim wrote: > >Every zspage in a size_class has same number of max objects so > >we could move it to a size_class. > > > >Signed-off-by: Minchan Kim <minc...@kernel

Re: [PATCH v1 02/19] mm/compaction: support non-lru movable page migration

2016-03-11 Thread Minchan Kim
; > url: > https://github.com/0day-ci/linux/commits/Minchan-Kim/Support-non-lru-page-migration/20160311-153649 > config: x86_64-nfsroot (attached as .config) > reproduce: > # save the attached .config to linux build tree > make ARCH=x86_64 > > All erro

[PATCH v1 18/19] zsmalloc: migrate tail pages in zspage

2016-03-10 Thread Minchan Kim
of this feature and realworkload overhead(i.e., most overhead comes from compression). Signed-off-by: Minchan Kim <minc...@kernel.org> --- mm/zsmalloc.c | 131 +++--- 1 file changed, 115 insertions(+), 16 deletions(-) diff --git a/mm/zsmalloc.

[PATCH v1 15/19] zsmalloc: zs_compact refactoring

2016-03-10 Thread Minchan Kim
ocated objects in the zspage with pinning tag so user cannot free using object. With those functions, this patch redesign compaction. Those functions will be used for implementing zspage runtime migrations, too. Signed-off-by: Minchan Kim <minc...@kernel.org> --- mm/zsma

  1   2   >