lkml.org 
[lkml]   [2011]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 4/4] sched: Distangle worker accounting from rq->lock
On Wed, 22 Jun 2011, Thomas Gleixner wrote:
> +void wq_worker_sleeping(struct task_struct *task)
> {
> - struct worker *worker = kthread_data(task), *to_wakeup = NULL;
> - struct global_cwq *gcwq = get_gcwq(cpu);
> - atomic_t *nr_running = get_gcwq_nr_running(cpu);
> + struct worker *worker = kthread_data(task);
> + struct global_cwq *gcwq;
> + int cpu;
>
> if (worker->flags & WORKER_NOT_RUNNING)
> - return NULL;
> + return;
>
> - /* this can only happen on the local cpu */
> - BUG_ON(cpu != raw_smp_processor_id());
> + if (WARN_ON_ONCE(worker->sleeping))
> + return;

Darn, forgot to add

worker->sleeping = 1;

back when I added the WARN_ON.



\
 
 \ /
  Last update: 2011-06-22 21:33    [W:0.154 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site