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 +- > drivers/dma-buf/d

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 25GB

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 Thanks for the fixing! Acked-by: Minchan Kim ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

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

2016-06-29 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 that

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

2016-06-27 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] > > > > &g

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

2016-06-15 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:

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] gener

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 wrote: > > > Recently, I got many reports about perfermance degradation in embedded > > system(Android mobile phone, webOS TV and so on) and easy fork fail. > &

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

2016-05-31 Thread Minchan Kim
x-foundation.org Cc: Jonathan Corbet Cc: John Einar Reitan Cc: dri-de...@lists.freedesktop.org Cc: Sergey Senozhatsky Acked-by: Vlastimil Babka Signed-off-by: Gioh Kim Signed-off-by: Minchan Kim --- Documentation/filesystems/Locking | 4 + Documentation/filesystems/vfs.txt | 11 +++ Docume

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

2016-05-31 Thread Minchan Kim
eral migration functions and make balloon compaction simple. Cc: virtualization@lists.linux-foundation.org Cc: Rafael Aquini Cc: Konstantin Khlebnikov Acked-by: Vlastimil Babka Signed-off-by: Gioh Kim Signed-off-by: Minchan Kim --- drivers/virtio/virtio_balloon.c| 54 +++---

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

2016-05-31 Thread Minchan Kim
c: Joonsoo Kim Cc: Konstantin Khlebnikov Cc: Mel Gorman Cc: Naoya Horiguchi Cc: Rafael Aquini Cc: Rik van Riel Cc: Sergey Senozhatsky Cc: virtualization@lists.linux-foundation.org Cc: Gioh Kim Cc: Chan Gyun Jeong Cc: Sangseok Lee Cc: Kyeongdon Kim Cc: Chulmin Kim Minchan Kim (12): mm: us

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 f

[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 Date: Fr

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 Date: Fri, 8

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
eral migration functions and make balloon compaction simple. Cc: virtualization@lists.linux-foundation.org Cc: Rafael Aquini Cc: Konstantin Khlebnikov Signed-off-by: Gioh Kim Signed-off-by: Minchan Kim --- drivers/virtio/virtio_balloon.c| 54 +++--- include/linux/balloon_com

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

2016-05-20 Thread Minchan Kim
oundation.org Cc: Jonathan Corbet Cc: John Einar Reitan Cc: dri-de...@lists.freedesktop.org Cc: Sergey Senozhatsky Signed-off-by: Gioh Kim Signed-off-by: Minchan Kim --- Documentation/filesystems/Locking | 4 + Documentation/filesystems/vfs.txt | 11 +++ Documentation/vm/page_migration

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

2016-05-20 Thread Minchan Kim
ey Senozhatsky Cc: virtualization@lists.linux-foundation.org Cc: Gioh Kim Cc: Chan Gyun Jeong Cc: Sangseok Lee Cc: Kyeongdon Kim Cc: Chulmin Kim 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: u

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
virtualization@lists.linux-foundation.org Cc: Jonathan Corbet Cc: John Einar Reitan Cc: dri-de...@lists.freedesktop.org Cc: Sergey Senozhatsky Signed-off-by: Gioh Kim Signed-off-by: Minchan Kim --- Documentation/filesystems/Locking | 4 + Documentation/filesystems/vfs.txt | 11 ++ Documentation/vm/pag

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

2016-05-08 Thread Minchan Kim
stantin Khlebnikov Cc: Mel Gorman Cc: Naoya Horiguchi Cc: Rafael Aquini Cc: Rik van Riel Cc: Sergey Senozhatsky Cc: virtualization@lists.linux-foundation.org Cc: Gioh Kim Cc: Chan Gyun Jeong Cc: Sangseok Lee Cc: Kyeongdon Kim Cc: Chulmin Kim Minchan Kim (12): mm: use put_page to fr

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

2016-05-08 Thread Minchan Kim
eral migration functions and make balloon compaction simple. Cc: virtualization@lists.linux-foundation.org Cc: Rafael Aquini Cc: Konstantin Khlebnikov Signed-off-by: Gioh Kim Signed-off-by: Minchan Kim --- drivers/virtio/virtio_balloon.c| 52 +++-- include/linux/balloon_com

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 wrote: > > > Recently, I got many reports about perfermance degradation in embedded > > system(Android mobile phone, webOS TV and so on) and easy fork

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

2016-04-27 Thread Minchan Kim
n Einar Reitan Cc: Jonathan Corbet Cc: Joonsoo Kim Cc: Konstantin Khlebnikov Cc: Mel Gorman Cc: Naoya Horiguchi Cc: Rafael Aquini Cc: Rik van Riel Cc: Sergey Senozhatsky Cc: virtualization@lists.linux-foundation.org Cc: Gioh Kim Cc: Chan Gyun Jeong Cc: Sangseok Lee Cc: Kyeongdon Kim Cc: Chulmin

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

2016-04-27 Thread Minchan Kim
virtualization@lists.linux-foundation.org Cc: Jonathan Corbet Cc: John Einar Reitan Cc: dri-de...@lists.freedesktop.org Cc: Sergey Senozhatsky Signed-off-by: Gioh Kim Signed-off-by: Minchan Kim --- Documentation/filesystems/Locking | 4 + Documentation/filesystems/vfs.txt | 11 ++ Documentation/vm/pag

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

2016-04-27 Thread Minchan Kim
eral migration functions and make balloon compaction simple. Cc: virtualization@lists.linux-foundation.org Cc: Rafael Aquini Cc: Konstantin Khlebnikov Signed-off-by: Gioh Kim Signed-off-by: Minchan Kim --- drivers/virtio/virtio_balloon.c| 52 +++-- include/linux/balloon_com

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 patc

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=li

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

2016-04-03 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 success

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
27;s a 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

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 bette

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 successful,

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 cover

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 wrote: > > > Recently, I got many reports about perfermance degradation > > in embedded system(Android mobile phone, webOS TV and so on) > > and failed to f

[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 --- mm/zsmalloc.c

[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 --- include/uapi/linux/magic.h | 1 + mm/zsmalloc.c | 332 +++-- 2 files changed, 318 insertions(+), 15 deletions(-) diff --git a

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

2016-03-30 Thread Minchan Kim
ode 0, zone DMA214 66 87 29 10 3 0 0 0 0 0 Node 0, zoneDMA32 1612 3139 3154 2469 1745990384 94 7 0 0 As you can see, compaction made so many high-order pages. Yay! Reviewed-by: Sergey Senozhatsky

[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:

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

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

[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 --- mm/zsmalloc.c | 103 -- 1 file changed, 71 insertions(+), 32 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 8649d0243e6c..4dd72a803568 100644

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

2016-03-30 Thread Minchan Kim
d-off-by: Minchan Kim --- 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/zsmalloc.c @@ -981,7 +

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

2016-03-30 Thread Minchan Kim
be replaced 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

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

2016-03-30 Thread Minchan Kim
zspage migration. Signed-off-by: Minchan Kim --- 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/mm/zsmalloc.c @@ -949,7

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

2016-03-30 Thread Minchan Kim
nctions and make balloon compaction simple. Cc: virtualization@lists.linux-foundation.org Cc: Rafael Aquini Cc: Konstantin Khlebnikov Signed-off-by: Gioh Kim Signed-off-by: Minchan Kim --- drivers/virtio/virtio_balloon.c| 53 --- include/linux/balloon_compact

[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 --- mm/zsmalloc.c | 22 +++--- 1 file changed, 11 insertions(+), 11 d

[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 --- 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 @@ -922,7 +922,6 @

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

2016-03-30 Thread Minchan Kim
dri-de...@lists.freedesktop.org Cc: virtualization@lists.linux-foundation.org Signed-off-by: Gioh Kim Signed-off-by: Minchan Kim --- Documentation/filesystems/Locking | 4 + Documentation/filesystems/vfs.txt | 5 + fs/proc/page.c | 3 + include/linu

[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 Signed-off-by: Minchan Kim --- Documentation/filesystems/vfs.txt | 11 ++- Documentation/vm/page_migration | 69 ++- 2 files changed, 78 insertions

[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 --- mm/zsmalloc.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index a0890e9003e2

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

2016-03-30 Thread Minchan Kim
quot;Yeah, and compaction (perhaps also other migration users) has to drain the lru pvec... Getting rid of this stuff is worth even by itself." Cc: Mel Gorman Cc: Hugh Dickins Cc: Naoya Horiguchi Acked-by: Vlastimil Babka Signed-off-by: Minchan Kim --- mm/migrate.c | 50 +++

[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 > Signed-off-by: Fengguang Wu > --- &

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-20 Thread Minchan Kim
, too right before calling ->migratepage so such race doesn't exist any more. Signed-off-by: Minchan Kim --- include/uapi/linux/magic.h | 1 + mm/zsmalloc.c | 329 +++-- 2 files changed, 317 insertions(+), 13 deletions(-) diff --git a

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

2016-03-20 Thread Minchan Kim
nctions and make balloon compaction simple. Cc: virtualization@lists.linux-foundation.org Cc: Rafael Aquini Cc: Konstantin Khlebnikov Signed-off-by: Gioh Kim Signed-off-by: Minchan Kim --- drivers/virtio/virtio_balloon.c| 45 - include/linux/balloon_compact

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

2016-03-20 Thread Minchan Kim
this feature and realworkload overhead(i.e., most overhead comes from compression). Signed-off-by: Minchan Kim --- mm/zsmalloc.c | 131 +++--- 1 file changed, 115 insertions(+), 16 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index

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

2016-03-20 Thread Minchan Kim
4. If migration fails, putback function of subsystem should clear PG_isolated via ClearPageIsolated. Cc: Vlastimil Babka Cc: Mel Gorman Cc: Hugh Dickins Cc: dri-de...@lists.freedesktop.org Cc: virtualization@lists.linux-foundation.org Signed-off-by: Gioh Kim Signed-off-by: Minch

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

2016-03-20 Thread Minchan Kim
ode 0, zone DMA214 66 87 29 10 3 0 0 0 0 0 Node 0, zoneDMA32 1612 3139 3154 2469 1745990384 94 7 0 0 As you can see, compaction made so many high-order pages. Yay! Reviewed-by: Sergey Senozhatsky

[PATCH v2 12/18] zsmalloc: zs_compact refactoring

2016-03-20 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 --- mm/zsmalloc.c

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

2016-03-20 Thread Minchan Kim
be replaced 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

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

2016-03-20 Thread Minchan Kim
d-off-by: Minchan Kim --- 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/zsmalloc.c @@ -982,7 +

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

2016-03-20 Thread Minchan Kim
zspage migration. Signed-off-by: Minchan Kim --- 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/mm/zsmalloc.c @@ -950,7

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

2016-03-20 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 --- mm/zsmalloc.c | 23 --- 1 file changed, 12 insertions(+), 11 d

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

2016-03-20 Thread Minchan Kim
could squeeze inuse object count to page->mapping. Signed-off-by: Minchan Kim --- mm/zsmalloc.c | 103 -- 1 file changed, 71 insertions(+), 32 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 8649d0243e6c..4dd72a803568 100644

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

2016-03-20 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:

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

2016-03-20 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 --- mm/zsmalloc.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index a0890e9003e2

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

2016-03-20 Thread Minchan Kim
tions 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 Signed-off-by: Minchan Kim --- mm/zsmalloc.c | 42 +++--- 1 file changed, 15

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

2016-03-20 Thread Minchan Kim
Let's remove unused pool param in obj_free Reviewed-by: Sergey Senozhatsky Signed-off-by: Minchan Kim --- mm/zsmalloc.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 16556a6db628..a0890e9003e2 100644 --- a/mm/zsmalloc.c +++

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

2016-03-20 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 Signed-off-

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

2016-03-20 Thread Minchan Kim
This patch cleans up function parameter ordering to order higher data structure first. Reviewed-by: Sergey Senozhatsky Signed-off-by: Minchan Kim --- mm/zsmalloc.c | 50 ++ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/mm

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

2016-03-20 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-20 Thread Minchan Kim
quot;Yeah, and compaction (perhaps also other migration users) has to drain the lru pvec... Getting rid of this stuff is worth even by itself." Cc: Mel Gorman Cc: Hugh Dickins Cc: Naoya Horiguchi Acked-by: Vlastimil Babka Signed-off-by: Minchan Kim --- mm/migrate.c | 50 +++

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-14 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 09/19] zsmalloc: keep max_object in size_class

2016-03-14 Thread Minchan Kim
On Tue, Mar 15, 2016 at 03:28:24PM +0900, Sergey Senozhatsky wrote: > On (03/11/16 16: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 >

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 successful,

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 Ki

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
this feature and realworkload overhead(i.e., most overhead comes from compression). Signed-off-by: Minchan Kim --- mm/zsmalloc.c | 131 +++--- 1 file changed, 115 insertions(+), 16 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index

  1   2   >