Re: [PATCH] workqueue: Handle race between wake up and rebind

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, Neeraj.

On Mon, Jan 15, 2018 at 02:08:12PM +0530, Neeraj Upadhyay wrote:
> - kworker/0:0 gets chance to run on cpu1; while processing
>   a work, it goes to sleep. However, it does not decrement
>   pool->nr_running. This is because WORKER_REBOUND (NOT_
>   RUNNING) flag was cleared, when worker entered worker_

Do you mean that because REBOUND was set?

>   thread().
> 
>   Worker 0 runs on cpu1
>     worker_thread()
>       process_one_work()
>         wq_worker_sleeping()
>           if (worker->flags & WORKER_NOT_RUNNING)
>             return NULL;
>           if (WARN_ON_ONCE(pool->cpu != raw_smp_processor_id()))
>             <Does not decrement nr_running>
> 
> - After this, when kworker/0:0 wakes up, this time on its
>   bounded cpu cpu0, it increments pool->nr_running again.
>   So, pool->nr_running becomes 2.

Why is it suddenly 2?  Who made it one on the account of the kworker?

Do you see this happening?  Or better, is there a (semi) reliable
repro for this issue?

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux