Re: workqueue: WARN at at kernel/workqueue.c:2176

From: Peter Zijlstra
Date: Wed Jun 04 2014 - 02:50:05 EST


On Wed, Jun 04, 2014 at 10:27:25AM +0800, Lai Jiangshan wrote:
> > Hmm, yes I think you're right. A queued wakeup can miss an affinity
> > change like that.
> >
> > Something like the below ought to cure that I suppose..
>
> As a non-scheduler developer, I can't find anything wrong with the patch
> (I searched all on_rq in kernel/sched).

You did fine finding that hole, so who knows, you might become one real
soon now ;-)

> but I think __migrate_task() is slow path comparing to sched_ttwu_pending().
> So I prefer to change set_cpus_allowed_ptr() and __migrate_task() rather than
> to sched_ttwu_pending().

Yes, I agree, something there would be better, but I couldn't find
anything without holes in.


Attachment: pgpVz0EarZh_H.pgp
Description: PGP signature