Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753399Ab3GWG2j (ORCPT ); Tue, 23 Jul 2013 02:28:39 -0400 Received: from mail-oa0-f43.google.com ([209.85.219.43]:65473 "EHLO mail-oa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751579Ab3GWG2f (ORCPT ); Tue, 23 Jul 2013 02:28:35 -0400 MIME-Version: 1.0 In-Reply-To: <15305281.aClQ8XUG9t@vostro.rjw.lan> References: <1367884221-20462-1-git-send-email-ccross@android.com> <15305281.aClQ8XUG9t@vostro.rjw.lan> Date: Mon, 22 Jul 2013 23:28:34 -0700 X-Google-Sender-Auth: e19BEIx0v1gXqiJiWnuw9__3DEo Message-ID: Subject: Re: 3.11-rc regression bisected: s2disk does not work (was Re: [PATCH v3 13/16] futex: use freezable blocking call) From: Colin Cross To: "Rafael J. Wysocki" Cc: Linus Torvalds , Michael Leun , lkml , Pavel Machek , Peter Zijlstra , Ingo Molnar , Andrew Morton , Mandeep Singh Baines , Oleg Nesterov , linux-nfs , Linux PM list , netdev , Tejun Heo , Darren Hart , Thomas Gleixner , Randy Dunlap , Al Viro Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2219 Lines: 53 On Mon, Jul 22, 2013 at 6:41 PM, Rafael J. Wysocki wrote: > On Monday, July 22, 2013 05:42:49 PM Colin Cross wrote: >> On Mon, Jul 22, 2013 at 5:32 PM, Linus Torvalds >> wrote: >> > On Mon, Jul 22, 2013 at 4:55 PM, Colin Cross wrote: >> >> >> >> I think the right solution is to add a flag to the freezing task that >> >> marks it unfreezable. I think PF_NOFREEZE would work, although it is >> >> normally used on kernel threads, can you see if the attached patch >> >> helps? >> > >> > Hmm. That does seem to be the right thing to do, but I wonder about >> > the *other* callers of freeze_processes() IOW, kexec and friends. >> > >> > So maybe we should do this in {freeze|thaw}_processes() itself, and >> > just make the rule be that the caller of freeze_processes() itself is >> > obviously not frozen, and has to be the same one that then thaws >> > things? >> > >> > Colin? Rafael? Comments? >> > >> > Linus >> >> I was worried about clearing the flag in thaw_processes(). If a >> kernel thread with PF_NOFREEZE set ever called thaw_processes(), which >> autosleep might do, it would clear the flag. Or if a different thread >> called freeze_processes() and thaw_processes(). > > Is that legitimate? Nothing precludes it today, but I don't see any need for it. I'll add a comment when I add the flag. >> All the other callers besides the SNAPSHOT_FREEZE ioctl stay in the kernel >> between freeze_processes() and thaw_processes(), which makes the fanout of >> places that could call try_to_freeze() much more controllable. >> >> Using a new flag that operates like PF_NOFREEZE but doesn't conflict >> with it, or a nofreeze_depth counter, would also work. > > Well, that would be robust enough. At least if the purpose of that new flag > is clearly specified, people hopefully won't be tempted to optimize it away in > the future. > > Thanks, > Rafael OK, I'll add a new flag. -- 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/