From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933644AbZFLJwU (ORCPT ); Fri, 12 Jun 2009 05:52:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933629AbZFLJwG (ORCPT ); Fri, 12 Jun 2009 05:52:06 -0400 Received: from cantor2.suse.de ([195.135.220.15]:41581 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933619AbZFLJwE (ORCPT ); Fri, 12 Jun 2009 05:52:04 -0400 Date: Fri, 12 Jun 2009 11:52:06 +0200 From: Nick Piggin To: Pekka Enberg Cc: Ingo Molnar , linux-mm@kvack.org, linux-kernel@vger.kernel.org, benh@kernel.crashing.org, akpm@linux-foundation.org, cl@linux-foundation.org, torvalds@linux-foundation.org Subject: Re: [PATCH v2] slab,slub: ignore __GFP_WAIT if we're booting or suspending Message-ID: <20090612095206.GA13607@wotan.suse.de> References: <20090612091002.GA32052@elte.hu> <84144f020906120249y20c32d47y5615a32b3c9950df@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <84144f020906120249y20c32d47y5615a32b3c9950df@mail.gmail.com> User-Agent: Mutt/1.5.9i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 12, 2009 at 12:49:17PM +0300, Pekka Enberg wrote: > On Fri, Jun 12, 2009 at 12:10 PM, Ingo Molnar wrote: > >> @@ -1548,6 +1548,20 @@ new_slab: > >>               goto load_freelist; > >>       } > >> > >> +     /* > >> +      * Lets not wait if we're booting up or suspending even if the user > >> +      * asks for it. > >> +      */ > >> +     if (system_state != SYSTEM_RUNNING) > >> +             gfpflags &= ~__GFP_WAIT; > > > > Hiding that bug like that is not particularly clean IMO. We should > > not let system_state hacks spread like that. > > > > We emit a debug warning but dont crash, so all should be fine and > > the culprits can then be fixed, right? > > OK, lets not use system_state then and go with Ben's approach then. > Again, neither of the patches are about "hiding buggy callers" but > changing allocation policy wrt. gfp flags during boot (and later on > during suspend). Maybe if we just not make it a general "tweak gfpflag" bit (at least not until a bit more discussion), but a specific workaround for the local_irq_enable in early boot problem. Seems like it would not be hard to track things down if we add a warning if we have GFP_WAIT and interrupts are not enabled...