[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090224154351.GD17294@us.ibm.com>
Date: Tue, 24 Feb 2009 09:43:51 -0600
From: "Serge E. Hallyn" <serue@...ibm.com>
To: Dave Hansen <dave@...ux.vnet.ibm.com>
Cc: Alexey Dobriyan <adobriyan@...il.com>, hpa@...or.com,
linux-api@...r.kernel.org, containers@...ts.linux-foundation.org,
Nathan Lynch <nathanl@...tin.ibm.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
tglx@...utronix.de, viro@...iv.linux.org.uk, mpm@...enic.com,
Ingo Molnar <mingo@...e.hu>, torvalds@...ux-foundation.org,
Andrew Morton <akpm@...ux-foundation.org>, xemul@...nvz.org
Subject: Re: Banning checkpoint (was: Re: What can OpenVZ do?)
Quoting Dave Hansen (dave@...ux.vnet.ibm.com):
> On Tue, 2009-02-24 at 07:47 +0300, Alexey Dobriyan wrote:
> > > I think what I posted is a decent compromise. It gets you those
> > > warnings at runtime and is a one-way trip for any given process. But,
> > > it does detect in certain cases (fork() and unshare(FILES)) when it is
> > > safe to make the trip back to the "I'm checkpointable" state again.
> >
> > "Checkpointable" is not even per-process property.
> >
> > Imagine, set of SAs (struct xfrm_state) and SPDs (struct xfrm_policy).
> > They are a) per-netns, b) persistent.
> >
> > You can hook into socketcalls to mark process as uncheckpointable,
> > but since SAs and SPDs are persistent, original process already exited.
> > You're going to walk every process with same netns as SA adder and mark
> > it as uncheckpointable. Definitely doable, but ugly, isn't it?
> >
> > Same for iptable rules.
> >
> > "Checkpointable" is container property, OK?
>
> Ideally, I completely agree.
>
> But, we don't currently have a concept of a true container in the
> kernel. Do you have any suggestions for any current objects that we
> could use in its place for a while?
I think the main point is that it makes the concept of marking a task as
uncheckpointable unworkable. So at sys_checkpoint() time or when we cat
/proc/$$/checkpointable, we can check for all of the uncheckpointable
state of both $$ and its container (including whether $$ is a container
init). But we can't expect that (to use Alexey's example) when one task
in a netns does a certain sys_socketcall, all tasks in the container
will be marked uncheckpointable. Or at least we don't want to.
Which means task->uncheckpointable can't be the big stick which I think
you were hoping it would be.
-serge
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists