[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090131101502.7ce8e7af@infradead.org>
Date: Sat, 31 Jan 2009 10:15:02 -0800
From: Arjan van de Ven <arjan@...radead.org>
To: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Lai Jiangshan <laijs@...fujitsu.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [RFC][PATCH] create workqueue threads only when needed
On Sat, 31 Jan 2009 19:03:49 +0100
Frederic Weisbecker <fweisbec@...il.com> wrote:
> > one thing to look at for work queues that never get work is to see
> > if they are appropriate for the async function call interface
> > (the only requirement for that is that they need to cope with
> > calling inline in exceptional cases)
> >
>
>
> Hi Arjan,
>
> There is one thing that make it hard to replace workqueues in such
> cases, there is not guarantee the function will run in user context
> because of this condition:
>
> if (!async_enabled || !entry || atomic_read(&entry_count) > MAX_WORK)
>
> I wanted to replace kpsmoused with an async function but I want to
> schedule a slow work that can't be done from irq...
if there is enough value in having a variant that is guaranteed to
always run from a thread we could add that. Likely that needs that the
caller passes in a bit of memory, but that's not too big a deal.
If there is only 1 in the entire kernel it might not be worth it,
but if it's a common pattern then for sure...
do you have a feeling on how common this is ?
--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists