This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Relay CPU Hotplug support


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]