[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20081024142359.GA20433@redhat.com>
Date: Fri, 24 Oct 2008 16:23:59 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Gautham R Shenoy <ego@...ibm.com>
Cc: Rusty Russell <rusty@...tcorp.com.au>,
linux-kernel@...r.kernel.org, travis@....com,
Ingo Molnar <mingo@...e.hu>,
Srivatsa Vaddagiri <vatsa@...ibm.com>
Subject: Re: [PATCH 1/7] work_on_cpu: helper for doing task on a CPU.
On 10/24, Gautham R Shenoy wrote:
>
> On Fri, Oct 24, 2008 at 03:25:09PM +0200, Oleg Nesterov wrote:
> >
> > If we add another wq for work_on_cpu(), then we add another hard-to-maintain
> > rule: get_online_cpus() must not be used by any work which can be queued
> > on that wq. And, yet another per-cpu thread...
>
> No, we don't have that rule!
>
> Because using Rusty's function with a seperate workqueue,
> we queue the work item as follows:
>
> get_online_cpus();
> queue_work_on(cpu, &on_each_cpu_wq, &wfc.work);
> flush_work(&wfc.work);
> put_online_cpus();
>
> The very fact that we've successfully queued the work-item means that
> no cpu-hotplug operation can occur till our work item finishes
> execution.
Ah yes, thanks for correcting me.
> Yes, we end up using additional resources in the form of another per-cpu
> threads. But is that so much of an issue?
Well, don't ask me... but the only reason why we need these threads
is that we want to make work_on_cpu() useable from cpu-hotplug path,
a bit strange ;)
Oleg.
--
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