lkml.org 
[lkml]   [2009]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH] create workqueue threads only when needed
From
Date
On Mon, 2009-02-02 at 09:42 +0100, Stefan Richter wrote:

> >
> > IE. It will be pretty responsive -in general- but can suffer form
> > horrible latencies every now and then.
>
> Actually it /should/ be the other way around:
>
> The shared workqueue should only be used for work that sleeps only
> briefly (perhaps with the exception of very unlikely longer sleeps e.g.
> for allocations that cause paging).

I agree, I'm just stating the current situation :-) Hopefully something
like async funcs / slow work / whatever will take over the case of stuff
that wants to be around for longer. I haven't had a chance to look at
the async funcs yet, sounds like they may do the job tho in which case
I'll look at converting a driver or two to use them.

> Work which /may/ sleep longer, for example performs SCSI transactions,
> needs to go into a private workqueue or other kind of context.

Well, it's a bit silly to allocate a private workqueue with all it's
associated per CPU kernel threads for something as rare as resetting
your eth NIC ... or even SCSI error handling in fact.

> OTOH you are right too; work which must not be deferred too long by work
> from another uncooperative/ unfair subsystem is probably also better off
> in an own workqueue...

I suspect the main reason for dedicated work queues is that, plus the
per-CPU affinity.

Cheers,
Ben.



\
 
 \ /
  Last update: 2009-02-02 10:09    [W:0.061 / U:1.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site