Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3587013imm; Mon, 4 Jun 2018 06:12:39 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLpEh8MrlfHshKzOxue2owNPTXC43nYLxfyvBrwHr5y63lJZ/E66nJc59dZdw3HeeAOxgzI X-Received: by 2002:a17:902:7202:: with SMTP id ba2-v6mr14004929plb.119.1528117959578; Mon, 04 Jun 2018 06:12:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528117959; cv=none; d=google.com; s=arc-20160816; b=n+LFtOSnMt1vZZ9ttFUFkB6f+WkCa+7/pw/evz2bGG3ja5RBJ5BnvTaCamTOk2Kj7o +vh4TTEsMSvYV1iOZFo9KhVhaUH+ky+NZP/+YqNsS19252q/5pPiGrpC20psFn5xAM33 KyA1qs9eWNsoa6N4aPAuH58dmIYihj5Ipz5ykfS+r3VhqN7wtDq54ddWTNalTTvs7FJp wxfaoc4wC326gbvtTX06fZ8yAMboKOykiAPe82BQnjwRqYkbX4bZKYLeKda4E+uQqyfw I/g4wnPKTQOcovptmPHFws1D+CxM+9OD2SaxVKSXtPUyHCNZrccR7tPZfy6XFUMR7ns1 s6WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=Fz3LJ3kGdkUWqXoEDq6JUpvuoU3ridkU/Gm1FgFhv18=; b=dDAGxLyawQqijgBd4e7jAtPsGik18VlPvLkL5miXn3VJ8LndhhK9Hnr0bG35DOH66Q s6vzEoTdokCbh+acP3B4DQ7XloN2X9q5M6fUao4zpH5rSm296L2ODM9an/YTuOEUxj6E RHRytoF7laa+/ZmsKmeSgIxE+gfUz9M+XnLRNrxOzq1D8Zh55OW4cgiR/8wQXYk1Ganh xJcz/iJTBLsMdMiJXfvVX3MRk9mZBl3fVaLU6QCVqkGSizv7rfI+8zb98Bni0o/Pyd3F Jr2vijiVqC51XkLVget1/dQ3Wd0L/NykugbTfvBvLBzZl+oELF+/FerVYRMAP1pwoVwD CHUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u13-v6si10376670plm.99.2018.06.04.06.12.25; Mon, 04 Jun 2018 06:12:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753302AbeFDNLP (ORCPT + 99 others); Mon, 4 Jun 2018 09:11:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:58970 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753040AbeFDNLG (ORCPT ); Mon, 4 Jun 2018 09:11:06 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 19F2DAC8D; Mon, 4 Jun 2018 13:11:05 +0000 (UTC) Date: Mon, 4 Jun 2018 15:11:04 +0200 From: Michal Hocko To: Eric Dumazet Cc: David Miller , qing.huang@oracle.com, tariqt@mellanox.com, haakon.bugge@oracle.com, yanjun.zhu@oracle.com, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, gi-oh.kim@profitbricks.com Subject: Re: [PATCH V4] mlx4_core: allocate ICM memory in page size chunks Message-ID: <20180604131104.GS19202@dhcp22.suse.cz> References: <20180523232246.20445-1-qing.huang@oracle.com> <20180525.102321.858995452200286788.davem@davemloft.net> <7a353b65-6b7f-1aee-1c48-e83c8e02f693@gmail.com> <0e11e0fc-6ccf-aa93-9c4f-b9eae1b90643@gmail.com> <20180531065405.GH15278@dhcp22.suse.cz> <20180531085532.GK15278@dhcp22.suse.cz> <20180531091022.GL15278@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180531091022.GL15278@dhcp22.suse.cz> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 31-05-18 11:10:22, Michal Hocko wrote: > On Thu 31-05-18 10:55:32, Michal Hocko wrote: > > On Thu 31-05-18 04:35:31, Eric Dumazet wrote: > [...] > > > I merely copied/pasted from alloc_skb_with_frags() :/ > > > > I will have a look at it. Thanks! > > OK, so this is an example of an incremental development ;). > > __GFP_NORETRY was added by ed98df3361f0 ("net: use __GFP_NORETRY for > high order allocations") to prevent from OOM killer. Yet this was > not enough because fb05e7a89f50 ("net: don't wait for order-3 page > allocation") didn't want an excessive reclaim for non-costly orders > so it made it completely NOWAIT while it preserved __GFP_NORETRY in > place which is now redundant. Should I send a patch? Just in case you are interested --- From 5010543ed6f73e4c00367801486dca8d5c63b2ce Mon Sep 17 00:00:00 2001 From: Michal Hocko Date: Mon, 4 Jun 2018 15:07:37 +0200 Subject: [PATCH] net: cleanup gfp mask in alloc_skb_with_frags alloc_skb_with_frags uses __GFP_NORETRY for non-sleeping allocations which is just a noop and a little bit confusing. __GFP_NORETRY was added by ed98df3361f0 ("net: use __GFP_NORETRY for high order allocations") to prevent from the OOM killer. Yet this was not enough because fb05e7a89f50 ("net: don't wait for order-3 page allocation") didn't want an excessive reclaim for non-costly orders so it made it completely NOWAIT while it preserved __GFP_NORETRY in place which is now redundant. Drop the pointless __GFP_NORETRY because this function is used as copy&paste source for other places. Signed-off-by: Michal Hocko --- net/core/skbuff.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 857e4e6f751a..c1f22adc30de 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -5239,8 +5239,7 @@ struct sk_buff *alloc_skb_with_frags(unsigned long header_len, if (npages >= 1 << order) { page = alloc_pages((gfp_mask & ~__GFP_DIRECT_RECLAIM) | __GFP_COMP | - __GFP_NOWARN | - __GFP_NORETRY, + __GFP_NOWARN, order); if (page) goto fill_page; -- 2.17.0 -- Michal Hocko SUSE Labs