From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] zram: support page-based parallel write
Date: Mon, 24 Oct 2016 16:23:25 +0900 [thread overview]
Message-ID: <20161024072325.GC1855@swordfish> (raw)
In-Reply-To: <20161024055818.GA5703@blaptop>
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)
> > return NULL;
> >
> > list_for_each_entry(cb, &plug->cb_list, list)
> > if (cb->callback == unplug && cb->data == data)
> > return cb;
>
> Normally, this routine will check and bail out if it has been plugged
> rightly so it would be not too many allocation in there.
>
> Having said that, there is no need to allocate cb in block layer.
> drive can allocate one time and reuse it with passing it to the
> blk_check_plugged. I was tempted to introduce the API into block layer
> but it was just optimization/easy stuff once this patchset settle down
> so I didn't consider in this patchset.
aha. thanks.
> > > We have been used sysfs for tune the zram for a long time.
> > > Please suggest ideas if you have better. :)
> >
> > yeah, but this one feels like a super-hacky knob. basically
> >
> > "enable when you can't tweak your usage patterns. this will tweak the driver".
> >
> > so I'd probably prefer to keep it hidden for now (may be eventually
> > we will come to some "out-of-zram" solution. but the opposition may
> > be "fix your usage pattern").
>
> Frankly speaking, I tend to agree.
>
> As I mentioned in cover-letter or somethine, I don't want to make this knob.
> A option is we admit it's trade-off. So, if someone enables this config,
> he will lost random/direct IO performance at this moment while he can get much
> benefit buffered sequential read/write.
> What do you think?
yes, sounds like it. a config option, probably with a big-big warning
sign and no sysfs knob.
> > so this knob is not even guaranteed to be there all the time.
> >
> > I wish I could suggest any sound alternative, but I don't have one
> > at the moment. May be I'll have a chance to speak to block-dev people
> > next week.
>
> Okay. But I think it's not a good idea to hurt wb context you mentioned.
> IOW, IO queuing could be parallelized by multiple wb context but
> servicing(i.e., compression) should be done in zram contexts, not
> wb context.
yep. too many things can go wrong. we can schedule requests on a
different die/package/socket, probably pressuring data caches and
then there are NUMA systems, and so on and on and on. so I can
easily imagine a "fix your user space" response.
-ss
next prev parent reply other threads:[~2016-10-24 7:23 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
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 [this message]
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=20161024072325.GC1855@swordfish \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).