[Devel] Re: [PATCH] c/r: Add UTS support (v4)
Dave Hansen
dave at linux.vnet.ibm.com
Fri Mar 20 12:59:56 PDT 2009
On Fri, 2009-03-20 at 15:34 -0400, Oren Laadan wrote:
>
> 3) In checkpoint, for each task we'll do:
> if (nsproxy seen first time) {
> alloc nsproxy_objref
> for each ns in nsproxy {
> if (ns seen first time) {
> alloc ns_objref
> save state of ns
> } else {
> save existing ns_objref
> }
> }
> } else {
> save existing nsproxy_objref
> }
The problem with this is that the nsproxy is in no way, shape, or form
exposed to userspace. It is wholly an internal implementation detail.
Take out all the nsproxy bits you have above, and do this for each task:
> for each ns in nsproxy {
> if (ns seen first time) {
> alloc ns_objref
> save state of ns
> } else {
> save existing ns_objref
> }
> }
And it will still _function_ *exactly* the same. It won't be quite as
cache or space compact, but that's fine.
If you're worried about this extra space or cache impact, it can be
fixed up at restart with:
if (nsproxy_equal(tsk->nsproxy, parent->nsproxy)) {
get_nsproxy(parent->nsproxy);
put_nsproxy(tsk->nsproxy);
tsk->nsproxy = parent->nsproxy;
}
Voila. It won't be perfect. If the parent doesn't work we could also
try the siblings.
-- Dave
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list