linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCHSET] workqueue: implement and use WQ_UNBOUND
@ 2010-07-20 22:39 Tejun Heo
  2010-07-21 13:08 ` David Howells
  0 siblings, 1 reply; 15+ messages in thread
From: Tejun Heo @ 2010-07-20 22:39 UTC (permalink / raw)
  To: David Howells
  Cc: Arjan van de Ven, Frederic Weisbecker, torvalds, mingo,
	linux-kernel, jeff, akpm, rusty, cl, oleg, axboe, dwalker,
	stefanr, florian, andi, mst, randy.dunlap, Arjan van de Ven


Hello, David.

"David Howells" <dhowells@redhat.com> wrote:
> Does this mean you don't get reentrancy guarantees with unbounded work queues?

It means that unbound wq behaves like a generic worker pool.  Bound wq limits concurrency to minimal level but unbound one executes works as long as resources are available.  I'll continue below.

>I can't work out how you're achieving it with unbounded queues.  I presume with
>CPU-bound workqueues your doing it by binding the work item to the current CPU
>still...

Unbound works are served by a dedicated gcwq whose workers are not affine to any particular CPU.  As all unbound works are served by the same gcwq, non reentrancy is automatically guaranteed.

>Btw, how does this fare in an RT system, where work items bound to a CPU can't
>get executed because their CPU is busy with an RT thread, even though there are
>other, idle CPUs?

Sure, there's nothing special about unbound workers.  They're just normal kthreads.

>> Oh, and Frederic suggested that we would be better off with something based
>> on tracing API and I agree, so the debugfs thing is currently dropped from
>> the tree.  What do you think?
>
>I probably disagree.  I just want to be able to cat a file and see the current
>runqueue state.  I don't want to have to write and distribute a special program
>to do this.  Of course, I don't know that much about the tracing API, so
>cat'ing a file to get the runqueue listed nicely may be possible with that.

I'm relatively sure we can do that.  Frederic?

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: [PATCH 34/35] async: use workqueue for worker pool
  2010-06-29 16:40                 ` Arjan van de Ven
@ 2010-06-29 16:59 Tejun Heo
  2010-06-28 21:03 ` [PATCHSET] workqueue: concurrency managed workqueue, take#6 Tejun Heo
  0 siblings, 1 reply; 15+ messages in thread
From: Tejun Heo @ 2010-06-29 16:59 UTC (permalink / raw)
  To: Arjan van de Ven
  Cc: Frederic Weisbecker, torvalds, mingo, linux-kernel, jeff, akpm,
	rusty, cl, dhowells, oleg, axboe, dwalker, stefanr, florian, andi,
	mst, randy.dunlap, Arjan van de Ven

Hello, Arjan.

On 06/29/2010 06:40 PM, Arjan van de Ven wrote:
> uh? clearly the assumption is that if I have a 16 CPU machine, and 12
> items of work get scheduled,
> that we get all 12 running in parallel. All the smarts of cmwq surely
> only kick in once you've reached the
> "one work item per cpu" threshold ???

Hmmm... workqueue workers are bound to certain cpu, so if you schedule
a work on a specific CPU, it will run there.  Once a cpu gets
saturated, the issuing thread will be moved elsewhere.  I don't think
it matters to any of the current async users one way or the other,
would it?

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-07-21 15:52 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-20 22:39 [PATCHSET] workqueue: implement and use WQ_UNBOUND Tejun Heo
2010-07-21 13:08 ` David Howells
2010-07-21 14:59   ` Tejun Heo
2010-07-21 15:03     ` Tejun Heo
2010-07-21 15:25     ` David Howells
2010-07-21 15:31       ` Tejun Heo
2010-07-21 15:38         ` David Howells
2010-07-21 15:42           ` Tejun Heo
2010-07-21 15:45         ` David Howells
2010-07-21 15:51           ` Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2010-06-29 16:59 [PATCH 34/35] async: use workqueue for worker pool Tejun Heo
2010-06-28 21:03 ` [PATCHSET] workqueue: concurrency managed workqueue, take#6 Tejun Heo
2010-06-28 21:04   ` [PATCH 34/35] async: use workqueue for worker pool Tejun Heo
2010-06-28 22:55     ` Frederic Weisbecker
2010-06-29  7:25       ` Tejun Heo
2010-06-29 12:18         ` Frederic Weisbecker
2010-06-29 15:46           ` Tejun Heo
2010-06-29 15:52             ` Frederic Weisbecker
2010-06-29 15:55               ` Tejun Heo
2010-06-29 16:40                 ` Arjan van de Ven
2010-06-29 21:37                   ` David Howells
2010-07-02  9:17                     ` [PATCHSET] workqueue: implement and use WQ_UNBOUND Tejun Heo
2010-07-02  9:32                       ` Tejun Heo
2010-07-07  5:41                       ` Tejun Heo
2010-07-14  9:39                         ` Tejun Heo
2010-07-20 22:01                       ` David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).