Re: [PATCH v6 7/7] zsmalloc: use shrinker to trigger auto-compaction

2015-07-07 Thread Sergey Senozhatsky
On (07/08/15 12:04), Minchan Kim wrote: > Hi Sergey, > Hi Minchan, [..] > > (a) we need something to signify that zs_unregister_shrinker() was > > successful > > I think a) is simple way to handle it now. > I don't want to stuck with this issue. > > Please comment out why we need such boolean

Re: [PATCH v6 7/7] zsmalloc: use shrinker to trigger auto-compaction

2015-07-07 Thread Minchan Kim
Hi Sergey, On Wed, Jul 08, 2015 at 11:18:36AM +0900, Sergey Senozhatsky wrote: > On (07/08/15 00:12), Sergey Senozhatsky wrote: > > > I don't think it would fail in *real practice*. > > > Althout it might happen, what does zram could help in that cases? > > > > > > > This argument depends on the

Re: [PATCH v6 7/7] zsmalloc: use shrinker to trigger auto-compaction

2015-07-07 Thread Sergey Senozhatsky
On (07/08/15 00:12), Sergey Senozhatsky wrote: > > I don't think it would fail in *real practice*. > > Althout it might happen, what does zram could help in that cases? > > > > This argument depends on the current register_shrinker() implementation, > should some one add additional return branch

Re: [PATCH v6 7/7] zsmalloc: use shrinker to trigger auto-compaction

2015-07-07 Thread Sergey Senozhatsky
On (07/08/15 00:01), Minchan Kim wrote: [..] > > But why would we do this? Yes, it's kinda-sorta bad -- we were not > > able to register zspool shrinker, so there will be no automatic > > compaction... And that's it. > > > > It does not affect zsmalloc/zram functionality by any means. Including >

Re: [PATCH v6 7/7] zsmalloc: use shrinker to trigger auto-compaction

2015-07-07 Thread Minchan Kim
On Tue, Jul 07, 2015 at 11:41:07PM +0900, Sergey Senozhatsky wrote: > On (07/07/15 22:44), Minchan Kim wrote: > [..] > > IMO, there is no value to maintain just in case of > > failing register_shrinker in practice. > > > > Let's remove shrinker_enabled and abort pool creation if shrinker register

Re: [PATCH v6 7/7] zsmalloc: use shrinker to trigger auto-compaction

2015-07-07 Thread Sergey Senozhatsky
On (07/07/15 22:44), Minchan Kim wrote: [..] > IMO, there is no value to maintain just in case of > failing register_shrinker in practice. > > Let's remove shrinker_enabled and abort pool creation if shrinker register > is failed. But why would we do this? Yes, it's kinda-sorta bad -- we were not

Re: [PATCH v6 7/7] zsmalloc: use shrinker to trigger auto-compaction

2015-07-07 Thread Minchan Kim
On Tue, Jul 07, 2015 at 08:57:01PM +0900, Sergey Senozhatsky wrote: > Perform automatic pool compaction by a shrinker when system > is getting tight on memory. > > User-space has a very little knowledge regarding zsmalloc fragmentation > and basically has no mechanism to tell whether compaction wi