[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070107144236.GB149@tv-sign.ru>
Date: Sun, 7 Jan 2007 17:42:36 +0300
From: Oleg Nesterov <oleg@...sign.ru>
To: Srivatsa Vaddagiri <vatsa@...ibm.com>
Cc: Andrew Morton <akpm@...l.org>, 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] fix-flush_workqueue-vs-cpu_dead-race-update
On 01/07, Oleg Nesterov wrote:
>
> How about:
>
> CPU_DEAD does nothing. After __cpu_disable() cwq->thread runs on
> all CPUs and becomes idle when it flushes cwq->worklist: nobody
> will add work_struct on that list.
Also, we can add cpu_workqueue_struct->should_exit_after_flush flag, but
we have to be careful to serialize with destroy_workqueue/CPU_UP.
> CPU_UP:
> if (!cwq->thread)
> create_workqueue_thread();
> else
> set_cpus_allowed(newcpu);
>
> flush_workqueue:
> for_each_possible_cpu() // NOT online!
> if (cwq->thread)
> flush_cpu_workqueue()
-
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