public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [RFC][PATCH] create workqueue threads only when needed
Date: Sat, 31 Jan 2009 19:28:45 +0100	[thread overview]
Message-ID: <20090131182843.GD5884@nowhere> (raw)
In-Reply-To: <20090131101502.7ce8e7af@infradead.org>

On Sat, Jan 31, 2009 at 10:15:02AM -0800, Arjan van de Ven wrote:
> On Sat, 31 Jan 2009 19:03:49 +0100
> Frederic Weisbecker <fweisbec@gmail.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 ?
> 


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.


  reply	other threads:[~2009-01-31 18:28 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-27  0:17 [RFC][PATCH] create workqueue threads only when needed Frederic Weisbecker
2009-01-27  0:30 ` Arjan van de Ven
2009-01-31 18:03   ` Frederic Weisbecker
2009-01-31 18:15     ` Arjan van de Ven
2009-01-31 18:28       ` Frederic Weisbecker [this message]
2009-02-01 16:22         ` Stefan Richter
2009-02-01 17:04           ` Arjan van de Ven
2009-02-01 17:40             ` Stefan Richter
2009-02-01 17:47               ` Arjan van de Ven
2009-02-01 18:06                 ` Stefan Richter
2009-02-01 18:11                   ` Arjan van de Ven
2009-02-01 21:37         ` Benjamin Herrenschmidt
2009-02-02  2:24           ` Frederic Weisbecker
2009-02-02  6:00             ` Benjamin Herrenschmidt
2009-02-02  8:42               ` Stefan Richter
2009-02-02  9:05                 ` Benjamin Herrenschmidt
2009-02-02  9:14                   ` Oliver Neukum
2009-02-02  9:46                     ` Benjamin Herrenschmidt
2009-02-02  9:58                       ` Peter Zijlstra
2009-02-02 10:03                       ` Oliver Neukum
2009-02-02 20:44                         ` Benjamin Herrenschmidt
2009-02-04  9:54                           ` Oliver Neukum
2009-02-02 11:39                     ` Stefan Richter
2009-02-02 11:32                 ` Frederic Weisbecker
2009-02-02 11:26               ` Frederic Weisbecker
2009-02-02  5:19           ` Arjan van de Ven
2009-02-02  6:01             ` Benjamin Herrenschmidt
2009-02-02  9:01             ` Stefan Richter
2009-02-02 14:45               ` Arjan van de Ven
     [not found] ` <20090126162807.1131c777.akpm@linux-foundation.org>
2009-01-27  1:46   ` Oleg Nesterov
2009-01-27  8:40     ` Frederic Weisbecker
2009-01-27  3:07 ` Alasdair G Kergon
2009-01-27  8:57   ` Frederic Weisbecker
2009-01-27 12:43     ` Ingo Molnar
2009-02-02 14:49 ` Daniel Walker
2009-02-02 14:51   ` Frédéric Weisbecker
2009-02-02 15:40     ` Daniel Walker

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=20090131182843.GD5884@nowhere \
    --to=fweisbec@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.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