lkml.org 
[lkml]   [2007]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH, RFC] reimplement flush_workqueue()
On Thu, 4 Jan 2007 21:09:01 +0300
Oleg Nesterov <oleg@tv-sign.ru> wrote:

> > --- a/kernel/workqueue.c~flush_workqueue-use-preempt_disable-to-hold-off-cpu-hotplug
> > +++ a/kernel/workqueue.c
> > @@ -419,18 +419,22 @@ static void flush_cpu_workqueue(struct c
> > * Probably keventd trying to flush its own queue. So simply run
> > * it by hand rather than deadlocking.
> > */
> > - mutex_unlock(&workqueue_mutex);
> > + preempt_enable();
>
> Ah, (looking at _cpu_down()->stop_machine()), so preempt_disable() not only "pins"
> the current CPU, it blocks cpu_down(), yes ???

yep.

But before we do much more of this we should have a wrapper. Umm

static inline void block_cpu_hotplug(void)
{
preempt_disable();
}

and use that, so people can see why it's being used.

I spose I'll do that and convert this patch to use it.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-01-04 19:35    [W:0.197 / U:0.396 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site