This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH] Relay CPU Hotplug support
- From: Oleg Nesterov <oleg at tv-sign dot ru>
- To: Andrew Morton <akpm at osdl dot org>
- Cc: ego at in dot ibm dot com, Mathieu Desnoyers <mathieu dot desnoyers at polymtl dot ca>, linux-kernel at vger dot kernel dot org, David Wilder <dwilder at us dot ibm dot com>, Tom Zanussi <zanussi at us dot ibm dot com>, Ingo Molnar <mingo at redhat dot com>, Greg Kroah-Hartman <gregkh at suse dot de>, Christoph Hellwig <hch at infradead dot org>, ltt-dev at shafik dot org, systemtap at sources dot redhat dot com, Douglas Niehaus <niehaus at eecs dot ku dot edu>, "Martin J. Bligh" <mbligh at mbligh dot org>, Thomas Gleixner <tglx at linutronix dot de>, kiran at scalex86 dot org, venkatesh dot pallipadi at intel dot com, dipankar at in dot ibm dot com, vatsa at in dot ibm dot com, torvalds at osdl dot org, davej at redhat dot com
- Date: Fri, 22 Dec 2006 19:42:43 +0300
- Subject: Re: [PATCH] Relay CPU Hotplug support
- References: <20061221003101.GA28643@Krystal> <20061220232350.eb4b6a46.akpm@osdl.org> <20061222103724.GA29348@in.ibm.com> <20061222024458.322adffd.akpm@osdl.org> <20061222162044.GA279@tv-sign.ru>
On 12/22, Oleg Nesterov wrote:
>
> void flush_work(struct workqueue_struct *wq, struct work_struct *work)
> {
> struct cpu_workqueue_struct *cwq;
>
> cwq = get_wq_data(work);
> if (!cwq)
> return;
>
> spin_lock_irq(&cwq->lock);
> list_del_init(&work->entry);
> work_release(work);
> spin_unlock_irq(&cwq->lock);
Err, forgot to mention, this should be done under workqueue_mutex
or we should re-check cwq == get_wq_data(), I didn't decide yet.
Sorry for extra noise.
Oleg.