Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964934AbWHLRbR (ORCPT ); Sat, 12 Aug 2006 13:31:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964933AbWHLRbR (ORCPT ); Sat, 12 Aug 2006 13:31:17 -0400 Received: from helium.samage.net ([83.149.67.129]:30897 "EHLO helium.samage.net") by vger.kernel.org with ESMTP id S964926AbWHLRbP (ORCPT ); Sat, 12 Aug 2006 13:31:15 -0400 Message-ID: <44640.81.207.0.53.1155403862.squirrel@81.207.0.53> In-Reply-To: <20060812141445.30842.47336.sendpatchset@lappy> References: <20060812141415.30842.78695.sendpatchset@lappy> <20060812141445.30842.47336.sendpatchset@lappy> Date: Sat, 12 Aug 2006 19:31:02 +0200 (CEST) Subject: Re: [RFC][PATCH 3/4] deadlock prevention core From: "Indan Zupancic" To: "Peter Zijlstra" Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, "Peter Zijlstra" , "Evgeniy Polyakov" , "Daniel Phillips" , "Rik van Riel" , "David Miller" User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Priority: 3 (Normal) Importance: Normal Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 979 Lines: 34 On Sat, August 12, 2006 16:14, Peter Zijlstra said: > +struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask, int fclone) > +{ > + struct sk_buff *skb; > + > + skb = ___alloc_skb(size, gfp_mask & ~__GFP_MEMALLOC, fclone); > + > + if (!skb && (gfp_mask & __GFP_MEMALLOC) && memalloc_skbs_available()) > + skb = ___alloc_skb(size, gfp_mask, fclone); > + > + return skb; > +} > + I'd drop the memalloc_skbs_available() check, as that's already done by ___alloc_skb. > +static DEFINE_SPINLOCK(memalloc_lock); > +static int memalloc_socks; > +static unsigned long memalloc_reserve; Why is this a long? adjust_memalloc_reserve() takes an int. Is it needed at all, considering var_free_kbytes already exists? Greetings, Indan - 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/