Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759866AbYJINoy (ORCPT ); Thu, 9 Oct 2008 09:44:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758103AbYJINoq (ORCPT ); Thu, 9 Oct 2008 09:44:46 -0400 Received: from mx3.mail.elte.hu ([157.181.1.138]:58075 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758084AbYJINoq (ORCPT ); Thu, 9 Oct 2008 09:44:46 -0400 Date: Thu, 9 Oct 2008 15:44:15 +0200 From: Ingo Molnar To: Dave Hansen Cc: Oren Laadan , jeremy@goop.org, arnd@arndb.de, containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Alexander Viro , "H. Peter Anvin" Subject: Re: [RFC v6][PATCH 0/9] Kernel based checkpoint/restart Message-ID: <20081009134415.GA12135@elte.hu> References: <1223461197-11513-1-git-send-email-orenl@cs.columbia.edu> <20081009124658.GE2952@elte.hu> <1223557122.11830.14.camel@nimitz> <20081009131701.GA21112@elte.hu> <1223559246.11830.23.camel@nimitz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1223559246.11830.23.camel@nimitz> User-Agent: Mutt/1.5.18 (2008-05-17) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00,DNS_FROM_SECURITYSAGE autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.0 DNS_FROM_SECURITYSAGE RBL: Envelope sender in blackholes.securitysage.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2463 Lines: 65 * Dave Hansen wrote: > On Thu, 2008-10-09 at 15:17 +0200, Ingo Molnar wrote: > > * Dave Hansen wrote > > > On Thu, 2008-10-09 at 14:46 +0200, Ingo Molnar wrote: > > > > i'm wondering about the following productization aspect: it would be > > > > very useful to applications and users if they knew whether it is safe to > > > > checkpoint a given app. I.e. whether that app has any state that cannot > > > > be stored/restored yet. > > > > > > Absolutely! > > > > > > My first inclination was to do this at checkpoint time: detect and > > > tell users why an app or container can't actually be checkpointed. > > > But, if I get you right, you're talking about something that happens > > > more during the runtime of the app than during the checkpoint. This > > > sounds like a wonderful approach to me, and much better than what I > > > was thinking of. > > > > > > What kind of mechanism do you have in mind? > > > > > > int sys_remap_file_pages(...) > > > { > > > ... > > > oh_crap_we_dont_support_this_yet(current); > > > } > > > > > > Then the oh_crap..() function sets a task flag or something? > > > > yeah, something like that. A key aspect of it is that is has to be very > > low-key on the source code level - we dont want to sprinkle the kernel > > with anything ugly. Perhaps something pretty explicit: > > > > current->flags |= PF_NOCR; > > Am I miscounting, or are we out of these suckers on 32-bit platforms? We've still got a few holes: you can pick 0x00000020, 0x00000080, 0x00004000, 0x08000000. > > as we do the same thing today for certain facilities: > > > > current->flags |= PF_NOFREEZE; > > > > you probably want to hide it behind: > > > > set_current_nocr(); > > Yeah, that all looks reasonable. Letting this be a dynamic thing > where you can move back and forth between the two states would make a > lot of sense too. But, for now, I guess it can be a one-way trip. there might be races as well, especially with proxy state - and current->flags updates are not serialized. So maybe it should be a completely separate flag after all? Stick it into the end of task_struct perhaps. Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/