From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Matthew Wilcox <matthew@wil.cx>
Cc: ksummit-2008-discuss@lists.linux-foundation.org,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [Ksummit-2008-discuss] Delayed interrupt work, thread pools
Date: Tue, 01 Jul 2008 23:38:31 +1000 [thread overview]
Message-ID: <1214919511.20711.150.camel@pasglop> (raw)
In-Reply-To: <20080701125357.GT14894@parisc-linux.org>
On Tue, 2008-07-01 at 06:53 -0600, Matthew Wilcox wrote:
> On Tue, Jul 01, 2008 at 10:45:35PM +1000, Benjamin Herrenschmidt wrote:
> > In various areas (I'll come up with some examples later), kernel code
> > such as drivers want to defer some processing to "task level", for
> > various reasons such as locking (taking mutexes), memory allocation,
> > interrupt latency, or simply doing things that may take more time than
> > is reasonable to do at interrupt time or do things that may block.
> >
> > Currently, the main mechanism we provide to do that is workqueues. They
> > somewhat solve the problem, but at the same time, somewhat can make it
> > worse.
>
> Why not just use a dedicated thread? The API to start / stop threads is
> now pretty easy to use.
A dedicated thread isn't far from a dedicated workqueue. The thread can
be blocked servicing a page fault and that will delay any further work.
In the case of spufs, we could solve that by having a dedicated thread
per context. That's probably what we'll do for our proof-of-concept
implementation of our new ideas. But that sounds overkill, there
shouldn't be -that- much page faults. Similar comes with gfx cards with
MMUs, etc.. we'd end up with shitload of dedicated threads mostly
staying there sleeping and wasting kernel resources.
Another option I though about would be something akin to some of the
threadlet discussions (or whatever we call those nowadays). ie, have the
workqueue fork when it blocks basically. That would require some API
changes as current drivers may rely on the fact that all workqueues
tasks are serialized though.
Cheers,
Ben.
next prev parent reply other threads:[~2008-07-01 13:38 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-01 12:45 Delayed interrupt work, thread pools Benjamin Herrenschmidt
2008-07-01 12:53 ` [Ksummit-2008-discuss] " Matthew Wilcox
2008-07-01 13:38 ` Benjamin Herrenschmidt [this message]
2008-07-01 13:02 ` Robin Holt
2008-07-02 1:39 ` Dean Nelson
2008-07-02 2:38 ` Benjamin Herrenschmidt
2008-07-02 2:47 ` Dave Chinner
2008-07-02 14:27 ` [Ksummit-2008-discuss] " Hugh Dickins
2008-07-02 4:22 ` Arjan van de Ven
2008-07-02 5:44 ` Benjamin Herrenschmidt
2008-07-02 11:02 ` Andi Kleen
2008-07-02 11:19 ` Leon Woestenberg
2008-07-02 11:24 ` Andi Kleen
2008-07-02 20:57 ` Benjamin Herrenschmidt
2008-07-02 14:11 ` James Bottomley
2008-07-02 20:00 ` Steven Rostedt
2008-07-02 20:22 ` James Bottomley
2008-07-02 20:28 ` Arjan van de Ven
2008-07-02 20:40 ` Steven Rostedt
2008-07-02 21:02 ` Benjamin Herrenschmidt
2008-07-02 21:00 ` Benjamin Herrenschmidt
2008-07-03 10:12 ` Eric W. Biederman
2008-07-03 10:31 ` Benjamin Herrenschmidt
2008-07-07 14:09 ` Chris Mason
2008-07-07 23:03 ` Benjamin Herrenschmidt
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=1214919511.20711.150.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=ksummit-2008-discuss@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
/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