All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shaohua Li <shli@fb.com>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: <linux-kernel@vger.kernel.org>, <axboe@kernel.dk>
Subject: Re: [PATCH] blk: clean up plug
Date: Fri, 17 Apr 2015 14:00:51 -0700	[thread overview]
Message-ID: <20150417210050.GA819331@devbig257.prn2.facebook.com> (raw)
In-Reply-To: <x49y4lqmq5r.fsf@segfault.boston.devel.redhat.com>

On Fri, Apr 17, 2015 at 04:54:40PM -0400, Jeff Moyer wrote:
> Shaohua Li <shli@fb.com> writes:
> 
> > Current code looks like inner plug gets flushed with a
> > blk_finish_plug(). Actually it's a nop. All requests/callbacks are added
> > to current->plug, while only outmost plug is assigned to current->plug.
> > So inner plug always has empty request/callback list, which makes
> > blk_flush_plug_list() a nop. This tries to make the code more clear.
> >
> > Signed-off-by: Shaohua Li <shli@fb.com>
> 
> Hi, Shaohua,
> 
> I agree that this looks like a clean-up with no behavioral change, and
> it looks good to me.  However,it does make me scratch my head about the
> numbers I was seeing.  Here's the table from that other email thread[1]:
> 
> device|  vanilla   |    patch1      |   dio-noplug  |  noflush-nested
> ------+------------+----------------+---------------+-----------------
> rssda | 701,684    |    1,168,527   |   1,342,177   |   1,297,612
>       |     100%   |         +66%   |        +91%   |        +85%
> vdb0  | 358,264    |      902,913   |     906,850   |     922,327
>       |     100%   |        +152%   |       +153%   |       +157%
> 
> Patch1 refers to the first patch in this series, which fixes the merge
> logic for single-queue blk-mq devices.  Each column after that includes
> that first patch.  In dio-noplug, I removed the blk_plug from the
> direct-io code path (so there is no nesting at all).  This is a control,
> since it is what I expect the outcome of the noflush-nested column to
> actually be.  Then, the noflush-nested column leaves the blk_plug in
> place in the dio code, but includes the patch that prevents nested
> blk_plug's from being flushed.  All numbers are the average of 5 runs.
> With the exception of the vanilla run on rssda (the first run was
> faster, causing the average to go up), the standard deviation is very
> small.
> 
> For the dio-noplug column, if the inner plug really was a noop, then why
> would we see any change in performance?  Like I said, I agree with your
> reading of the code and the patch.  Color me confused.  I'll poke at it
> more next week.  For now, I think your patch is fine.
> 
> Reviewed-by: Jeff Moyer <jmoyer@redhat.com>

Thanks! I don't know why either the your second makes change.
 
> Also, Jens or Shaohua or anyone, please review my blk-mq plug fix (patch
> 1/2 of aforementioned thread).  ;)

You are not alone :), I posted 2 times too
http://marc.info/?l=linux-kernel&m=142627559617005&w=2


Thanks,
Shaohua

  reply	other threads:[~2015-04-17 21:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-16 17:28 [PATCH] blk: clean up plug Shaohua Li
2015-04-17 20:54 ` Jeff Moyer
2015-04-17 21:00   ` Shaohua Li [this message]
2015-04-17 21:10     ` Jeff Moyer

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=20150417210050.GA819331@devbig257.prn2.facebook.com \
    --to=shli@fb.com \
    --cc=axboe@kernel.dk \
    --cc=jmoyer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.