lkml.org 
[lkml]   [2009]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] create workqueue threads only when needed
On Sun, 01 Feb 2009 17:22:47 +0100
Stefan Richter <stefanr@s5r6.in-berlin.de> wrote:

> > I don't know, most of those I've looked on are not documented about
> > the reason for a private workqueue. I guess most of them can use
> > the usual kevent.
>
> I have stuff in drivers/firewire/ done in a private workqueue and some
> in the shared workqueue which I will eventually move either into
> short-lived ad hoc created kthreads /or/ preferably into a thread pool
> implementation --- if such a thing will have found its way into the
> kernel when I have time for my project.
>
> I need to get callers of scsi_add_device and scsi_remove_device out of
> the picture.

what are the requirements for you to do this?

right now, the async calls are "fire and forget... but you can wait for
completion". The "price" is that the code needs to allocate a little
bit of memory for management overhead. The second price then is that
if this allocation fails, the code needs to run "in context".

Would this be a problem?

I can add a variant of the API where you pass in some memory of your
own, which then does not fail. (but also won't get freed automatically
etc)



--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org


\
 
 \ /
  Last update: 2009-02-01 18:07    [W:0.150 / U:0.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site