Re: NFS Freezer and stuck tasks

From: Tejun Heo
Date: Sat May 02 2015 - 22:03:26 EST


Hey, Jeff.

On Fri, May 01, 2015 at 07:17:41PM -0400, Jeff Layton wrote:
> > Sorry for the noise, and self-reply.. Looks like there's additional context
> > here: http://marc.info/?t=136761512100007&r=1&w=2
> >
> > Due to a number of locking problems the answer to this problem is likely to
> > be "don't do that" for now.

Unfortunately, cgroup freezer is currently inherently broken. As it
currently stands, the situation is - if it works for certain use
cases, great; otherwise, don't do that.

...
> My memory is vague, but Tejun (cc'ed) and I discussed this a couple of
> years or so ago and the tentative idea at the time was to teach the
> NFS and RPC code to return a particular error akin to ERESTARTSYS
> (EFREEZE?) when a freeze event comes in and we haven't yet sent an RPC
> call.

The idea is that freezing should be essentially identical to how
SIGSTOP is handled when viewed from kernel side.

> The idea was to teach the ptrace layer to watch for this error and
> freeze at that point and then to reissue the syscall after resume. All
> of that's a non-trivial task though, as knowledge of this would need to
> be plumbed all the way through the stack down to the RPC layer.

So, if nfs can abort and return to userland on sigpending, the task
will be able to finish quckly; otherwise, it'd have to wait till nfs
finishes.

Thanks.

--
tejun
--
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/