RE: livepatch: change to a per-task consistency model
From: Jiri Kosina
Date: Tue May 24 2016 - 18:45:12 EST
On Tue, 24 May 2016, David Laight wrote:
> > > Related, please can we have a flag for the sleep and/or process so that
> > > an uninterruptible sleep doesn't trigger the 'hung task' detector
> > TASK_KILLABLE
> Not sure that does what I want.
> It appears to allow some 'kill' actions to wake the process.
> I'm sure I've looked at the 'hung task' code since 2007.
The trick is the
if (t->state == TASK_UNINTERRUPTIBLE)
test in check_hung_uninterruptible_tasks(). That makes sure that
TASK_KILLABLE tasks (e.g. waiting on NFS I/O, but not limited only to
that; feel free to set it whereever you need) are skipped. Please note
that TASK_KILLABLE is actually a _mask_ that includes TASK_UNINTERRUPTIBLE
as well; therefore the '==' test skips such tasks.