From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sukadev Bhattiprolu Subject: Re: C/R: File substitution at restart Date: Wed, 8 Sep 2010 10:56:48 -0700 Message-ID: <20100908175648.GA12281@us.ibm.com> References: <4C875F6E.2030004@kerlabs.com> <20100908130931.GA11161@hallyn.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <20100908130931.GA11161-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: "Serge E. Hallyn" Cc: "Serge E. Hallyn" , Nathan Lynch , containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Matthieu =?iso-8859-1?Q?Fertr=E9?= , Louis Rilling , Dan Smith List-Id: containers.vger.kernel.org Serge Hallyn [serge-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org] wrote: | Quoting Matthieu Fertr=E9 (matthieu.fertre-aw0BnHfMbSpBDgjK7y7TUQ@public.gmane.org): | > Hi, | > = | > Here is a proposal for a C/R related feature already developed in | > Kerrighed: file substitution at restart. | > = | > The goal of this mail is to start a discussion about adding such feature | > to Linux cr. Comments are welcome! | = | Yup, AFAIK metacluster and zap do this too. I don't think there is | any question about whether we want to support this, but rather | what the user-kernel API should look like. Perhaps the easiest | "API" is to have the userspace program rewrite the checkpoint image, | but that probably isn't quite as simple as just substituting #s in | the image, bc we'll have to also find the place where the source of | the original fd was specified and tweak that. | = | I assume this is one of the things Oren would have 'cradvise()' | do, and at this point that sounds nice to me - might be worth | seeing how the community reacts. Sentiments on such things change, | after all. Yes, I had the same question about the kernel API. cradvise() would be one option, but am not too clear on the details. For each process in the checkpoint image that we want to substitute one or more fds, do we call cradvise() *before* the call to sys_restart() ? This would require the kernel to save these substitution pairs in memory until the following sys_restart() right ? Passing in a list of fd-substition pairs to sys_restart() might be one option, but would require modifying the sys_restart() API. Sukadev