Re: [PATCH 3/3] zram: adjust the number of zram thread

2016-10-23 Thread Sergey Senozhatsky
On (10/24/16 13:54), Minchan Kim wrote: > > On (09/22/16 15:42), Minchan Kim wrote: > > [..] > > > +static int __zram_cpu_notifier(void *dummy, unsigned long action, > > > + unsigned long cpu) > > > { > > > struct zram_worker *worker; > > > > > > - while (!list_empty(&w

Re: [PATCH 3/3] zram: adjust the number of zram thread

2016-10-23 Thread Minchan Kim
On Fri, Oct 21, 2016 at 03:23:27PM +0900, Sergey Senozhatsky wrote: > On (09/22/16 15:42), Minchan Kim wrote: > [..] > > +static int __zram_cpu_notifier(void *dummy, unsigned long action, > > + unsigned long cpu) > > { > > struct zram_worker *worker; > > > > - whi

Re: [PATCH 3/3] zram: adjust the number of zram thread

2016-10-20 Thread Sergey Senozhatsky
On (09/22/16 15:42), Minchan Kim wrote: [..] > +static int __zram_cpu_notifier(void *dummy, unsigned long action, > + unsigned long cpu) > { > struct zram_worker *worker; > > - while (!list_empty(&workers.worker_list)) { > + switch (action) { > + cas

[PATCH 3/3] zram: adjust the number of zram thread

2016-09-21 Thread Minchan Kim
It's pointless to keep many workers greater than the number of online CPU so adjust the number of worker whenever changing online CPU number. Signed-off-by: Minchan Kim --- drivers/block/zram/zram_drv.c | 94 --- 1 file changed, 71 insertions(+), 23 deleti