From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@infradead.org>
Cc: Shlomo Pongratz <shlomop@mellanox.com>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] block/null_blk: Fix completion processing from LIFO to FIFO
Date: Thu, 6 Feb 2014 12:23:01 -0700 [thread overview]
Message-ID: <20140206192301.GC3950@kernel.dk> (raw)
In-Reply-To: <20140206163542.GA30008@infradead.org>
On Thu, Feb 06 2014, Christoph Hellwig wrote:
> On Thu, Feb 06, 2014 at 06:33:17PM +0200, Shlomo Pongratz wrote:
> > The completion queue is implemented using lockless list.
> >
> > The llist_add is adds the events to the list head which is a push operation.
> > The processing of the completion elements is done by disconnecting all the
> > pushed elements and iterating over the disconnected list. The problem is
> > that the processing is done in reverse order w.r.t order of the insertion
> > i.e. LIFO processing. By reversing the disconnected list which is done in
> > linear time the desired FIFO processing is achieved.
>
> I think it should just switch to using __smp_call_function_single
> directly, mirroring commit 3d6efbf62c797a2924785f482e4ce8aa8820ec72 for
> the blk-mq core.
>
> I've actually a patch in the queue that allows generic request
> completion offloading similar to blk_complete_request() in the old
> request code, but it'll need a bit more polishing first.
The patch is trivial enough that I may as well just apply it. It's not a
bug as such, but doing FIFO completions does make more sense. I was
aware of this issued, fwiw, it just didn't really matter for my testing
and I opted to avoid a list reversal to make it cheaper.
--
Jens Axboe
prev parent reply other threads:[~2014-02-06 19:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-06 16:33 [PATCH] block/null_blk: Fix completion processing from LIFO to FIFO Shlomo Pongratz
2014-02-06 16:35 ` Christoph Hellwig
2014-02-06 19:23 ` Jens Axboe [this message]
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=20140206192301.GC3950@kernel.dk \
--to=axboe@kernel.dk \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=shlomop@mellanox.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