public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: [PATCH 2/3] zram: support page-based parallel write
Date: Mon, 24 Oct 2016 13:51:56 +0900	[thread overview]
Message-ID: <20161024045156.GB4938@blaptop> (raw)
In-Reply-To: <20161021060809.GB527@swordfish>

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 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 mentioned? With blk-mq, I have some concerns.
> > > 
> > > 1. read speed degradation
> > > 2. no work with rw_page
> > > 3. more memory footprint by bio/request queue allocation
> > > 
> > > Having said, it's worth to look into it in detail more.
> > > I will have time to see that approach to know what I can do
> > > with that.
> > 
> > queue_mode=2 bs=4096 nr_devices=1 submit_queues=4 hw_queue_depth=128
> > 
> > Last week, I played with null_blk and blk-mq.c to get an idea how
> > blk-mq works and I realized it's not good for zram because it aims
> > to solve 1) dispatch queue bottleneck 2) cache-friendly IO completion
> > through IRQ so 3) avoids remote memory accesses.
> > 
> > For zram which is used for embedded as primary purpose, ones listed
> > abvoe are not a severe problem. Most imporant thing is there is no
> > model to support that a process queueing IO request on *a* CPU while
> > other CPUs issues the queued IO to driver.
> > 
> > Anyway, Although blk-mrq can support that model, it is blk-layer thing.
> > IOW, it's software stuff for fast IO delievry but what we need is
> > device parallelism of zram itself. So, although we follow blk-mq,
> > we still need multiple threads to compress in parallel which is most of
> > code I wrote in this patchset.
> 
> yes. but at least wb can be multi-threaded. well, sort of. seems like.
> sometimes.

Maybe, but it would be rather greedy approach for zram because zram will
do real IO(esp, compression which consumed a lot of time) in that context
although the context is sharable resource of all processes in the system.

> 
> > If I cannot get huge benefit(e.g., reduce a lot of zram-speicif code
> > to support such model) with blk-mq, I don't feel to switch to request
> > model at the cost of reasons I stated above.
> 
> thanks.
> I'm looking at your patches.

Currently, I found some subtle bug in my patchset so I will resend them
after hunting that with fixing a bug you found.

Thanks, Sergey!

  reply	other threads:[~2016-10-24  4:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22  6:42 [PATCH 1/3] zram: rename IO processing functions Minchan Kim
2016-09-22  6:42 ` [PATCH 2/3] zram: support page-based parallel write Minchan Kim
2016-09-29  3:18   ` Sergey Senozhatsky
2016-09-30  5:52     ` Minchan Kim
2016-10-04  4:43       ` Sergey Senozhatsky
2016-10-04  7:35         ` Minchan Kim
2016-10-05  2:01         ` Minchan Kim
2016-10-06  8:29           ` Sergey Senozhatsky
2016-10-07  6:33             ` Minchan Kim
2016-10-07 18:08               ` Sergey Senozhatsky
2016-10-17  5:04               ` Minchan Kim
2016-10-21  6:08                 ` Sergey Senozhatsky
2016-10-24  4:51                   ` Minchan Kim [this message]
2016-10-21  6:03   ` Sergey Senozhatsky
2016-10-24  4:47     ` Minchan Kim
2016-10-24  5:20       ` Sergey Senozhatsky
2016-10-24  5:58         ` Minchan Kim
2016-10-24  7:23           ` Sergey Senozhatsky
2016-09-22  6:42 ` [PATCH 3/3] zram: adjust the number of zram thread Minchan Kim
2016-10-21  6:23   ` Sergey Senozhatsky
2016-10-24  4:54     ` Minchan Kim
2016-10-24  5:29       ` Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161024045156.GB4938@blaptop \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox