LKML Archive on
help / color / mirror / Atom feed
* [PATCH 0/1] workqueue: don't migrate pending works from the dead CPU
@ 2007-02-04 20:33 Oleg Nesterov
  0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2007-02-04 20:33 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Ingo Molnar, Srivatsa Vaddagiri, Pallipadi, Venkatesh,
	Gautham shenoy, Christoph Lameter, linux-kernel

Andrew, please drop the workqueue-rework-threads-hotplug-management.patch,
and please take this one (feel free to just kill me instead).

We have workqueue callbacks (slab for example) which assume that CPU is
stable during the execution since cwq->thread is pinned to a processor.
With or without that patch this is not true with CONFIG_HOTPLUG_CPU, and
the problem is not connected to workqueue.c.

However, my patch makes the things worse, because CPU_UP_PREPARE creates
cwq->thread which is not pinned to CPU until CPU_ONLINE. This is solvable,
but needs a serious complication, so this patch can't be considered as a

The new patch removes take_over_work() and friends (as the old one did),
but retains an unfortunate property of the current implementation: the
workqueue_mutex is held from CPU_LOCK_ACQUIRE to CPU_LOCK_RELEASE, and
CPU_DEAD stops cwq->thread synchronously.

This means that cpu-hotplug callbacks can't create/destroy workqueues
(Gautham needs this?), and work->func() can't share a lock with cpu hotplug.
May be we can change this later, but this needs a separate patch.

Srivatsa, do you have any objections?

The new patch is very similar (in fact, a subset), I don't send incremental
update because this will break changelogs.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-04 20:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-04 20:33 [PATCH 0/1] workqueue: don't migrate pending works from the dead CPU Oleg Nesterov

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).