Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758709AbbLCIQw (ORCPT ); Thu, 3 Dec 2015 03:16:52 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:36581 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751355AbbLCIQu (ORCPT ); Thu, 3 Dec 2015 03:16:50 -0500 Date: Thu, 3 Dec 2015 09:16:47 +0100 From: Michal Hocko To: Chris Snook Cc: David Miller , pavel@ucw.cz, akpm@osdl.org, linux-kernel@vger.kernel.org, jcliburn@gmail.com, netdev@vger.kernel.org, rjw@rjwysocki.net, linux-mm@kvack.org, nic-devel@qualcomm.com, ronangeles@gmail.com, ebiederm@xmission.com Subject: Re: [PATCH] Improve Atheros ethernet driver not to do order 4 GFP_ATOMIC allocation Message-ID: <20151203081646.GB9264@dhcp22.suse.cz> References: <20151127082010.GA2500@dhcp22.suse.cz> <20151128145113.GB4135@amd> <20151130132129.GB21950@dhcp22.suse.cz> <20151201.153517.224543138214404348.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1620 Lines: 41 On Wed 02-12-15 22:43:31, Chris Snook wrote: > On Tue, Dec 1, 2015 at 12:35 PM David Miller wrote: > > > From: Michal Hocko > > Date: Mon, 30 Nov 2015 14:21:29 +0100 > > > > > On Sat 28-11-15 15:51:13, Pavel Machek wrote: > > >> > > >> atl1c driver is doing order-4 allocation with GFP_ATOMIC > > >> priority. That often breaks networking after resume. Switch to > > >> GFP_KERNEL. Still not ideal, but should be significantly better. > > > > > > It is not clear why GFP_KERNEL can replace GFP_ATOMIC safely neither > > > from the changelog nor from the patch context. > > > > Earlier in the function we do a GFP_KERNEL kmalloc so: > > > > ¯\_(ツ)_/¯ > > > > It should be fine. > > > > AFAICT, the people who benefit from GFP_ATOMIC are the people running all > their storage over NFS/iSCSI who are suspending their machines while > they're so busy they don't have any clean order 4 pagecache to drop, and > want the machine to panic rather than hang. Why would GFP_KERNEL order-4 allocation hang? It will fail if there are not >=4 order pages available even after reclaim and/or compaction. GFP_ATOMIC allocations should be used only when an access to memory reserves is really required. If the allocation just doesn't want to invoke direct reclaim then GFP_NOWAIT is a more suitable alternative. -- Michal Hocko 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/