From: dsahern@gmail.com (David Ahern)
Subject: RFC: Allow block drivers to poll for I/O instead of sleeping
Date: Sun, 23 Jun 2013 15:14:28 -0700 [thread overview]
Message-ID: <51C77344.2040907@gmail.com> (raw)
In-Reply-To: <20130623100920.GA19021@gmail.com>
On 6/23/13 3:09 AM, Ingo Molnar wrote:
> If an IO driver is implemented properly then it will batch up requests for
> the controller, and gets IRQ-notified on a (sub-)batch of buffers
> completed.
>
> If there's any spinning done then it should be NAPI-alike polling: a
> single "is stuff completed" polling pass per new block of work submitted,
> to opportunistically interleave completion with submission work.
>
> I don't see where active spinning brings would improve performance
> compared to a NAPI-alike technique. Your numbers obviously show a speedup
> we'd like to have, I'm just wondering whether the same speedup (or even
> more) could be implemented via:
>
> - smart batching that rate-limits completion IRQs in essence
> + NAPI-alike polling
>
> ... which would almost never result in IRQ driven completion when we are
> close to CPU-bound and while not yet saturating the IO controller's
> capacity.
>
> The spinning approach you add has the disadvantage of actively wasting CPU
> time, which could be used to run other tasks. In general it's much better
> to make sure the completion IRQs are rate-limited and just schedule. This
> (combined with a metric ton of fine details) is what the networking code
> does in essence, and they have no trouble reaching very high throughput.
Networking code has a similar proposal for low latency sockets using
polling: https://lwn.net/Articles/540281/
David
next prev parent reply other threads:[~2013-06-23 22:14 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-20 20:17 RFC: Allow block drivers to poll for I/O instead of sleeping Matthew Wilcox
2013-06-23 10:09 ` Ingo Molnar
2013-06-23 18:29 ` Linus Torvalds
2013-06-24 7:17 ` Jens Axboe
2013-06-25 0:11 ` Steven Rostedt
2013-06-25 3:07 ` Matthew Wilcox
2013-06-25 13:57 ` Steven Rostedt
2013-06-25 14:57 ` Jens Axboe
2013-06-24 8:07 ` Ingo Molnar
2013-06-25 3:18 ` Matthew Wilcox
2013-06-25 7:07 ` Bart Van Assche
2013-06-25 15:00 ` Jens Axboe
2013-06-27 18:10 ` Rik van Riel
2013-06-23 22:14 ` David Ahern [this message]
2013-06-24 8:21 ` Ingo Molnar
2013-06-24 7:15 ` Jens Axboe
2013-06-24 8:18 ` Ingo Molnar
2013-06-25 3:01 ` Matthew Wilcox
2013-06-25 14:55 ` Jens Axboe
2013-06-27 18:42 ` Rik van Riel
2013-07-04 1:13 ` Shaohua Li
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=51C77344.2040907@gmail.com \
--to=dsahern@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).