Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757542Ab1FIM4v (ORCPT ); Thu, 9 Jun 2011 08:56:51 -0400 Received: from cantor2.suse.de ([195.135.220.15]:39604 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757290Ab1FIM4s (ORCPT ); Thu, 9 Jun 2011 08:56:48 -0400 Date: Thu, 9 Jun 2011 13:56:42 +0100 From: Mel Gorman To: Micha? Miros?aw Cc: Andrew Morton , Linux-MM , Linux-Netdev , LKML , David Miller , Neil Brown , Peter Zijlstra Subject: Re: [PATCH 10/14] netvm: Set PF_MEMALLOC as appropriate during SKB processing Message-ID: <20110609125642.GS5247@suse.de> References: <1307606573-24704-1-git-send-email-mgorman@suse.de> <1307606573-24704-11-git-send-email-mgorman@suse.de> <20110609113505.GR5247@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2076 Lines: 53 On Thu, Jun 09, 2011 at 02:28:24PM +0200, Micha? Miros?aw wrote: > 2011/6/9 Mel Gorman : > > On Thu, Jun 09, 2011 at 12:21:31PM +0200, Micha? Miros?aw wrote: > >> 2011/6/9 Mel Gorman : > >> [...] > >> > +/* > >> > + * Limit which protocols can use the PFMEMALLOC reserves to those that are > >> > + * expected to be used for communication with swap. > >> > + */ > >> > +static bool skb_pfmemalloc_protocol(struct sk_buff *skb) > >> > +{ > >> > + ? ? ? switch (skb->protocol) { > >> > + ? ? ? case __constant_htons(ETH_P_ARP): > >> > + ? ? ? case __constant_htons(ETH_P_IP): > >> > + ? ? ? case __constant_htons(ETH_P_IPV6): > >> > + ? ? ? case __constant_htons(ETH_P_8021Q): > >> > + ? ? ? ? ? ? ? return true; > >> > + ? ? ? default: > >> > + ? ? ? ? ? ? ? return false; > >> > + ? ? ? } > >> > +} > >> > >> This is not needed and wrong. Whatever list there will be, it's going > >> to always miss some obscure setup (or not that obscure, like > >> ATAoverEthernet). > >> > > > > NBD is updated in the series to set the socket information > > appropriately but the same cannot be said of AoE. The necessary > > changes have been made IPv4 and IPv6 to handle pfmemalloc sockets > > but the same cannot be necessarily said for the other protocols. Yes, > > the check could be removed but leaving it there makes a clear statement > > on what scenario can be reasonably expected to work. > > Ok. Then the comment before skb_pfmemalloc_protocol() is misleading. > It should say that this is a list of protocols which implement the > required special handling of PFMEMALLOC skbs. > That's a very reasonable suggestion. My thinking behind that comment was a backwards because I only "expected" protocols that implemented the special handling to be used for swap :/ Thanks. -- Mel Gorman SUSE Labs -- 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/