Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp588225imm; Thu, 26 Jul 2018 08:37:14 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcPQjLSd82K0l0OcKeFeURfM2ovGv5CmjFUPV7opXtreXNEktlbkYoamjuqXBCuMtn0ndS1 X-Received: by 2002:a17:902:1101:: with SMTP id d1-v6mr2371982pla.147.1532619434304; Thu, 26 Jul 2018 08:37:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532619434; cv=none; d=google.com; s=arc-20160816; b=CO6P5TQUWOlRJS+72FTCcX8PWkMw5KpwYFz+oObWNlRspZLRE82wd10RSmIvwQdUPr BOFPjbb9aMvltZGQqLrMxxCahl2DVAvbODRpi3h7BavAR7CRn3OyH7I6SmihJgwUSZPt 75aDbAXIcaA5yhBvL2BZfxShJYDxYYqtQSzX8AvNFiTI9e4EekKy1Y0b5V5rNjLO90DX JfQ8NH34Izd3dlpeqwbKrOeNGRQDVwH+JMQUfJTyj9SBZGeH9bvToySHa/FCnY/C+EQf ZzSYDBDz92T20IyZetLCK3GW59cATz+PrOKtdj89Z9buXnVHEvtZa+i43aa49ZSxyLU+ V0TA== 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:dkim-signature:arc-authentication-results; bh=S0Ba/XILZM+5NKwvnAg/BW4PQkb0whah8cGJV3AxGQ4=; b=mblIGeXXb2W+AvkallcnJqunM/tmU0H4Q87IV+MXuvF6NN+YoZT7sHciB8pts5iwKN BJH6Lk1idgjcyw743lBHC2QATIHRMycPIBy49Csdb5vRIAlAGN1dCQPyoWUa17TQrPPs /go1ivtPDO33LgCRIkatJdxQIpkbRAfB16dYM5JBw5v02UpP8OIecBSObprMtFS6lTzs FOu+cEwA0i2xO2eJ2E0raAQAVxxMgBQxihi0oxoDLXWGVBSCC5ILN9dYFV/gZDB5Oj4y O8M/bxL3Ep5Xnr4/DRMfe/92Boj8CnEACWtM4y1POvr0LJfjec9ip5goMbnfg7GZa9Mt JqxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=VD+TPCTT; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e17-v6si1348792pgv.615.2018.07.26.08.36.59; Thu, 26 Jul 2018 08:37:14 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=VD+TPCTT; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731787AbeGZQxd (ORCPT + 99 others); Thu, 26 Jul 2018 12:53:33 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:45572 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731573AbeGZQxd (ORCPT ); Thu, 26 Jul 2018 12:53:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=S0Ba/XILZM+5NKwvnAg/BW4PQkb0whah8cGJV3AxGQ4=; b=VD+TPCTTES5f+jWPfPCkWhpA1 vFg1qpLH8NXV/42qRpmOMHOQkg9P9pvTq8hZRIpE38eXI3U0KoV/ogcnC4EAtBFQ/0kdWWO13ZVry aA9t0jwLhPmU9Q982CJ/LP4K8n1V8hCjXw+3DMp6f4xVlzeOzh95aPzyZgC2btiRXTXc31B6+LQnX ZoKnp+6/YsqRz8thA0MWqrBNGg+HrPe/xsXERgpcvz1nwBaqtJ7fy7OGNeSB5+Ie884px361fFGah ymre/AxT4T4IgR4NoCHxerE8uyGeuffuOSg7ccjInKj6MZKifxDHQMGaQ2EkUAQVtuDrgQvlpg6y9 kTn2eae4Q==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fiiJD-0007qM-8G; Thu, 26 Jul 2018 15:36:07 +0000 Date: Thu, 26 Jul 2018 08:36:05 -0700 From: Matthew Wilcox To: Mike Rapoport Cc: Michal Hocko , Jonathan Corbet , Andrew Morton , linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 7/7] docs/core-api: mm-api: add section about GFP flags Message-ID: <20180726153605.GB27612@bombadil.infradead.org> References: <1532607722-17079-1-git-send-email-rppt@linux.vnet.ibm.com> <1532607722-17079-8-git-send-email-rppt@linux.vnet.ibm.com> <20180726130106.GC3504@bombadil.infradead.org> <20180726142039.GA23627@dhcp22.suse.cz> <20180726151852.GF8477@rapoport-lnx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180726151852.GF8477@rapoport-lnx> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 26, 2018 at 06:18:53PM +0300, Mike Rapoport wrote: > On Thu, Jul 26, 2018 at 04:20:39PM +0200, Michal Hocko wrote: > > > Functions which need to allocate memory often use GFP flags to express > > > how that memory should be allocated. The GFP acronym stands for "get > > > free pages", the underlying memory allocation function. > > > > OK. > > > > > Not every GFP > > > flag is allowed to every function which may allocate memory. Most > > > users will want to use a plain ``GFP_KERNEL`` or ``GFP_ATOMIC``. > > > > Or rather than mentioning the two just use "Useful GFP flag > > combinations" comment segment from gfp.h > > The comment there includes GFP_DMA, GFP_NOIO etc so I'd prefer Matthew's > version and maybe even omit GFP_ATOMIC from it. I'm totally OK with that. > Some grepping shows that roughly 80% of allocations are GFP_KERNEL, 12% are > GFP_ATOMIC and ... I didn't count the usage of other flags ;-) ;-) You'll find a lot of GFP_NOFS and GFP_NOIO in the filesystem/block code ...