Re: [PATCH 2/3] zram: support page-based parallel write

2016-10-24 Thread Sergey Senozhatsky
On (10/24/16 14:58), Minchan Kim wrote: [..] > > struct blk_plug_cb *blk_check_plugged(blk_plug_cb_fn unplug, void *data, > > int size) > > { > > struct blk_plug *plug = current->plug; > > struct blk_plug_cb *cb; > > > > if (!plug) > > retu

Re: [PATCH 2/3] zram: support page-based parallel write

2016-10-23 Thread Minchan Kim
On Mon, Oct 24, 2016 at 02:20:44PM +0900, Sergey Senozhatsky wrote: > Hi Minchan, > > On (10/24/16 13:47), Minchan Kim wrote: > > Hi Sergey, > > > > > > +static void zram_unplug(struct blk_plug_cb *cb, bool from_schedule) > > > > +{ > > > > + spin_lock(&workers.req_lock); > > > > + if

Re: [PATCH 2/3] zram: support page-based parallel write

2016-10-23 Thread Sergey Senozhatsky
Hi Minchan, On (10/24/16 13:47), Minchan Kim wrote: > Hi Sergey, > > > > +static void zram_unplug(struct blk_plug_cb *cb, bool from_schedule) > > > +{ > > > + spin_lock(&workers.req_lock); > > > + if (workers.nr_req) > > > + worker_wake_up(); > > > + spin_unlock(&workers.req_lock); > > >

Re: [PATCH 2/3] zram: support page-based parallel write

2016-10-23 Thread Minchan Kim
On Fri, Oct 21, 2016 at 03:08:09PM +0900, Sergey Senozhatsky wrote: > Hello Minchan, > > On (10/17/16 14:04), Minchan Kim wrote: > > Hi Sergey, > > > > On Fri, Oct 07, 2016 at 03:33:22PM +0900, Minchan Kim wrote: > > > > < snip > > > > > > > so the question is -- can we move this parallelizatio

Re: [PATCH 2/3] zram: support page-based parallel write

2016-10-23 Thread Minchan Kim
Hi Sergey, On Fri, Oct 21, 2016 at 03:03:34PM +0900, Sergey Senozhatsky wrote: > On (09/22/16 15:42), Minchan Kim wrote: > > +static ssize_t use_aio_store(struct device *dev, > > + struct device_attribute *attr, const char *buf, size_t len) > > +{ > > + int ret; > > + u16 do_async; >

Re: [PATCH 2/3] zram: support page-based parallel write

2016-10-20 Thread Sergey Senozhatsky
Hello Minchan, On (10/17/16 14:04), Minchan Kim wrote: > Hi Sergey, > > On Fri, Oct 07, 2016 at 03:33:22PM +0900, Minchan Kim wrote: > > < snip > > > > > so the question is -- can we move this parallelization out of zram > > > and instead flush bdi in more than one kthread? how bad that would >

Re: [PATCH 2/3] zram: support page-based parallel write

2016-10-20 Thread Sergey Senozhatsky
On (09/22/16 15:42), Minchan Kim wrote: > +static ssize_t use_aio_store(struct device *dev, > + struct device_attribute *attr, const char *buf, size_t len) > +{ > + int ret; > + u16 do_async; > + struct zram *zram = dev_to_zram(dev); > + > + ret = kstrtou16(buf, 10, &do

Re: [PATCH 2/3] zram: support page-based parallel write

2016-10-16 Thread Minchan Kim
Hi Sergey, On Fri, Oct 07, 2016 at 03:33:22PM +0900, Minchan Kim wrote: < snip > > > so the question is -- can we move this parallelization out of zram > > and instead flush bdi in more than one kthread? how bad that would > > be? can anyone else benefit from this? > > Isn't it blk-mq you menti

Re: [PATCH 2/3] zram: support page-based parallel write

2016-10-09 Thread Sergey Senozhatsky
Hello Minchan, On (10/07/16 15:33), Minchan Kim wrote: [..] > > as soon as wb flush kworker can't keep up anymore things are going off > > the rails. most of the time, fio-template-static-buffer are in D state, > > while the biggest bdi flush kworker is doing the job (a lot of job): > > > > PID

Re: [PATCH 2/3] zram: support page-based parallel write

2016-10-06 Thread Minchan Kim
Hi Sergey, On Thu, Oct 06, 2016 at 05:29:15PM +0900, Sergey Senozhatsky wrote: > Hello Minchan, > > On (10/05/16 11:01), Minchan Kim wrote: > [..] > > 1. just changed ordering of test execution - hope to reduce testing time > > due to > >block population before the first reading or reading j

Re: [PATCH 2/3] zram: support page-based parallel write

2016-10-06 Thread Sergey Senozhatsky
Hello Minchan, On (10/05/16 11:01), Minchan Kim wrote: [..] > 1. just changed ordering of test execution - hope to reduce testing time due > to >block population before the first reading or reading just zero pages > 2. used sync_on_close instead of direct io > 3. Don't use perf to avoid noise

Re: [PATCH 2/3] zram: support page-based parallel write

2016-10-04 Thread Minchan Kim
Hi Sergey, On Tue, Oct 04, 2016 at 01:43:14PM +0900, Sergey Senozhatsky wrote: < snip > > TEST > > > new tests results; same tests, same conditions, same .config. > 4-way test: > - BASE zram, fio direct=1 > - BASE zram, fio fsync_on_close=1 > - NEW zram, fio direct=1 > - NEW zram, fio fsyn

Re: [PATCH 2/3] zram: support page-based parallel write

2016-10-04 Thread Minchan Kim
Hi Sergey, On Tue, Oct 04, 2016 at 01:43:14PM +0900, Sergey Senozhatsky wrote: > Hello, > > Cc Jens and block-dev, > > I'll outline the commit message for Jens and blockdev people, may be > someone will have some thoughts/ideas/opinions: Thanks for Ccing relevant poeple. Even, I didn't know we

Re: [PATCH 2/3] zram: support page-based parallel write

2016-10-03 Thread Sergey Senozhatsky
Hello, Cc Jens and block-dev, I'll outline the commit message for Jens and blockdev people, may be someone will have some thoughts/ideas/opinions: > On (09/22/16 15:42), Minchan Kim wrote: : zram supports stream-based parallel compression. IOW, it can support : parallel compression on SMP system

Re: [PATCH 2/3] zram: support page-based parallel write

2016-09-29 Thread Minchan Kim
Hi Sergey, On Thu, Sep 29, 2016 at 12:18:31PM +0900, Sergey Senozhatsky wrote: > Hello Minchan, > > On (09/22/16 15:42), Minchan Kim wrote: > > zram supports stream-based parallel compression. IOW, it can support > > parallel compression on SMP system only if each cpus has streams. > > For exampl

Re: [PATCH 2/3] zram: support page-based parallel write

2016-09-28 Thread Sergey Senozhatsky
Hello Minchan, On (09/22/16 15:42), Minchan Kim wrote: > zram supports stream-based parallel compression. IOW, it can support > parallel compression on SMP system only if each cpus has streams. > For example, assuming 4 CPU system, there are 4 sources for compressing > in system and each source mu

[PATCH 2/3] zram: support page-based parallel write

2016-09-21 Thread Minchan Kim
zram supports stream-based parallel compression. IOW, it can support parallel compression on SMP system only if each cpus has streams. For example, assuming 4 CPU system, there are 4 sources for compressing in system and each source must be located in each CPUs for full parallel compression. So, i