Re: [RFC][PATCHv4 6/7] zsmalloc: account the number of compacted pages

2015-07-06 Thread Minchan Kim
Hi Sergey, On Wed, Jul 01, 2015 at 04:29:52PM +0900, Sergey Senozhatsky wrote: > On (06/30/15 21:35), Sergey Senozhatsky wrote: > [..] > > if (src_page) > > putback_zspage(pool, class, src_page); > > > > - pool->num_migrated += cc.nr_migrated; > > + cc.nr_migrated /= get_maxo

Re: [RFC][PATCHv4 6/7] zsmalloc: account the number of compacted pages

2015-07-01 Thread Sergey Senozhatsky
On (07/01/15 16:29), Sergey Senozhatsky wrote: > if (putback_zspage(.. src_page)) > pool->num_migrated++; pool->num_migrated += class->pages_per_zspage; Of course. > (c) or we can check src_page fullness (or simply if src_page->inuse == 0) > in __zs_compact() and increme

Re: [RFC][PATCHv4 6/7] zsmalloc: account the number of compacted pages

2015-07-01 Thread Sergey Senozhatsky
On (06/30/15 21:35), Sergey Senozhatsky wrote: [..] > if (src_page) > putback_zspage(pool, class, src_page); > > - pool->num_migrated += cc.nr_migrated; > + cc.nr_migrated /= get_maxobj_per_zspage(class->size, > + class->pages_per_zspage); > + > +

[RFC][PATCHv4 6/7] zsmalloc: account the number of compacted pages

2015-06-30 Thread Sergey Senozhatsky
Compaction returns back to zram the number of migrated objects, which is quite uninformative -- we have objects of different sizes so user space cannot obtain any valuable data from that number. Change compaction to operate in terms of pages and return back to compaction issuer the number of pages