Re: __refrigerator() && saved task->state

From: Peter Zijlstra
Date: Wed Nov 13 2013 - 14:15:10 EST


On Wed, Nov 13, 2013 at 08:11:43PM +0100, Oleg Nesterov wrote:
> At first glance it would be better to simply kill this logic? If
> it was called with ->state != 0, the caller is going to schedule()
> and it probably executes the wait_event-like code, in this case
> it would me more safe to pretend the task got a spurious wakeup?

Note that in general the kernel cannot deal with spurious wakeups :/

Most proper locks and wait primitives can, but there's enough open-coded
crap out there that can not.

I tried..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/