From: Dave Chinner <david@fromorbit.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Christoph Hellwig <hch@infradead.org>,
Daniel Ehrenberg <dehrenberg@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: Approaches to making io_submit not block
Date: Thu, 1 Sep 2011 16:54:15 +1000 [thread overview]
Message-ID: <20110901065415.GP32358@dastard> (raw)
In-Reply-To: <20110901043947.GB7761@one.firstfloor.org>
On Thu, Sep 01, 2011 at 06:39:47AM +0200, Andi Kleen wrote:
> > Allocations are already serialised by a single resource - the AGF
> > lock - so whether they block on the workqueue queue or on the AGF
> > lock is irrelevant to scheduling. And a single thread can only have
>
> It's not about blocking, but about who gets the work accounted
> when it is done.
Don't trim the context away and respond with a completely different
argument that is irrelevant to the original context! Accounting who
did the work is irrelevant to the discussion context of the fairness
of queuing and dispatching synchronous allocations via a FIFO wq
implementation....
> > If we get lots of allocations queued on the one per-CPU wq, they
> > will have all had to come from different contexts. In which case,
> > FIFO processing of the work queued up is *exactly* the fairness we
> > want, because that is exactly what doing them from process context
> > would end up with.
>
> You want the work accounted to the originator so that it can be
> slowed down when it does too much (e.g. hit its cgroups or CFQ limits)
So fix the workqueue infrastructure to track it properly. Don't keep
bringing this up as a reason for saying moving work to workqueues is
bad.
> Networking learned these lessons a long time ago, it's much
> better for overload behavior when as much as possible is done in
> process context.
Apples to oranges - there's orders of magnitude of difference in the
number of operations that the different stacks do. Allocation in XFS
when it does not block can still take milliseconds of CPU time; in
comparison, the networking stack is expected to process thousands of
packets in that same time frame. IOWs, the scale of processing per
item of work is -vastly- different - that's why working in process
context matters a great deal to the networking stack but not to
allocation in XFS.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2011-09-01 6:54 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-29 17:33 Approaches to making io_submit not block Daniel Ehrenberg
2011-08-30 5:32 ` Christoph Hellwig
2011-08-30 21:51 ` Daniel Ehrenberg
2011-08-31 5:26 ` Christoph Hellwig
2011-08-31 17:08 ` Andi Kleen
2011-08-31 21:00 ` Daniel Ehrenberg
2011-08-31 21:15 ` Andi Kleen
2011-09-01 4:18 ` Dave Chinner
2011-09-01 4:39 ` Andi Kleen
2011-09-01 6:54 ` Dave Chinner [this message]
2011-09-02 13:08 ` Ted Ts'o
2011-09-02 13:10 ` Christoph Hellwig
2011-09-01 3:39 ` Dave Chinner
2011-09-01 4:20 ` Christoph Hellwig
2011-08-30 7:02 ` Andi Kleen
[not found] ` <CAAK6Zt0Sh1GdEOb-tNf2FGXJs=e1Jbcqew13R_GdTqrv6vW97w@mail.gmail.com>
[not found] ` <x49k49uk2ox.fsf@segfault.boston.devel.redhat.com>
[not found] ` <4E5D5817.6040704@kernel.dk>
2011-08-30 22:19 ` Daniel Ehrenberg
2011-08-30 22:32 ` Jens Axboe
2011-08-30 22:41 ` Andrew Morton
2011-08-30 22:45 ` Daniel Ehrenberg
2011-08-30 22:54 ` Andrew Morton
2011-08-30 23:03 ` Jeremy Allison
2011-08-30 23:11 ` Andrew Morton
2011-08-31 11:04 ` Ulrich Drepper
2011-08-31 16:59 ` Jeremy Allison
2011-09-01 11:14 ` Ulrich Drepper
2011-09-01 15:58 ` Jeremy Allison
2011-09-01 16:04 ` Christoph Hellwig
2011-09-01 16:15 ` Jeremy Allison
2011-09-01 16:23 ` Christoph Hellwig
2011-09-01 16:31 ` Jeremy Allison
2011-09-01 16:34 ` Christoph Hellwig
2011-09-01 16:34 ` Jeremy Allison
2011-09-01 16:45 ` Christoph Hellwig
2011-09-01 16:57 ` Jeremy Allison
2011-08-31 5:34 ` Christoph Hellwig
2011-08-31 6:04 ` guy keren
2011-08-31 23:16 ` Daniel Ehrenberg
2011-08-31 23:48 ` guy keren
2011-08-31 23:59 ` Daniel Ehrenberg
2011-08-31 15:45 ` Gleb Natapov
2011-08-31 16:02 ` Avi Kivity
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=20110901065415.GP32358@dastard \
--to=david@fromorbit.com \
--cc=andi@firstfloor.org \
--cc=dehrenberg@google.com \
--cc=hch@infradead.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox