[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070104103107.e33768d7.akpm@osdl.org>
Date: Thu, 4 Jan 2007 10:31:07 -0800
From: Andrew Morton <akpm@...l.org>
To: Oleg Nesterov <oleg@...sign.ru>
Cc: Srivatsa Vaddagiri <vatsa@...ibm.com>,
David Howells <dhowells@...hat.com>,
Christoph Hellwig <hch@...radead.org>,
Ingo Molnar <mingo@...e.hu>,
Linus Torvalds <torvalds@...l.org>,
linux-kernel@...r.kernel.org, Gautham shenoy <ego@...ibm.com>
Subject: Re: [PATCH, RFC] reimplement flush_workqueue()
On Thu, 4 Jan 2007 21:09:01 +0300
Oleg Nesterov <oleg@...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@...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