Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp419480imm; Thu, 26 Jul 2018 06:03:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe/IUwNmizACxyCTZH7ePoARyZKao5dNpynoasaJxkMrYXl4YVwZoiyTmT++wkisK7saJmu X-Received: by 2002:a65:53cb:: with SMTP id z11-v6mr1897076pgr.218.1532610200257; Thu, 26 Jul 2018 06:03:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532610200; cv=none; d=google.com; s=arc-20160816; b=QdOkF4H4yulmo+4kLT9JyuRnPRb8QK2TB4Mo4D5Zd8cipuPUfTzxbXhRLupXGpO5iS YB7NebNEi/jyNtl3vdpon4YU0VpwfbiomgZytwEReVcDIY5ZcWgQjDxMVdjocY0iUIWJ AF0fMEWQai0IuJW26wLdvAw6TRXgmP4cQWguCOlKKNZ0PbqLYDxSy6oYRzfCdFC0e9SJ mwuf8hqVi5IiquHVs9+LMtBPUpHFjmHECpePdcosSA6YkvTgIJLZHQ5/uTBVSCkolnk4 fni9538hyQgFrVrNZxHrelVkwxWlEGXa3rgmiq5f3tsNqj0WPs8hwIF45ugnm/JJOVsa B09Q== 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=zXASJV1B8w6TWTclebE+L67zvG3MwPJohKc8D5awSUQ=; b=zAUdHgfzAFu8yJnYhB/VxqseO3Nd9cwX/qnc+WYUxEsnOTRCDe58azYlreFFZEnOgp Rj4fUVC3bxEJ8w3LeynjQCFSDCjFNNxyhcgyDC2taLawwDUpTIgqfeBmapjPOR9oFKSi na17wb0okAb3uL0hiPGI4dZS/ys0NkWf1RVTYd9TeDoPiH6OM5unLiRxrn1lyFaZgReG HYwQITZqKaNXKp1tuERYedfrVHRM0UOWCD/iJ1chnaqH6rSD8vdGEpLbnogmNEBTnM3C Lw978rzoRyNvFQO+ITdDArDhdliZMCQncpcMpD1VKQ9UqTdEjFu1RefE9AsJofxr7p6/ iElQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=X3+63UBa; 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 d11-v6si1213385pgm.556.2018.07.26.06.03.04; Thu, 26 Jul 2018 06:03:20 -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=X3+63UBa; 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 S1730233AbeGZORy (ORCPT + 99 others); Thu, 26 Jul 2018 10:17:54 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:50274 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729852AbeGZORy (ORCPT ); Thu, 26 Jul 2018 10:17:54 -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=zXASJV1B8w6TWTclebE+L67zvG3MwPJohKc8D5awSUQ=; b=X3+63UBaeaMvPK++p/cHQHAiW Anbemo/zFWVPZn/xxrybQacASkIxDf8Wjq1wmUZo0cMJaa0b7pFX0tEbY1rVb/z/rm2yg+LFcQ176 tRJ+nR2tLSZOnYvnixUqYt3llgF1fFqvj6iE2Cqax8jeOhaZHz4avEWBZ3pBRc0tfKoqqHRKcWAzI 8ioHwZZxl6h4NgLB4xA+7nZIENHd2QIiTQAQ1RGa342TNVZ/YM/5PWLstnLSzeBs1sl0x8MS1x4H1 XIY8UfCsbdji/bETtNhOlLaKfvB1UQ5RA2ZsrsG/VvG2MCOXGRMwandfQjTOggm7F3rvbxJjCdjVB bwilizJFg==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fiftD-00006o-4m; Thu, 26 Jul 2018 13:01:07 +0000 Date: Thu, 26 Jul 2018 06:01:06 -0700 From: Matthew Wilcox To: Mike Rapoport Cc: 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: <20180726130106.GC3504@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1532607722-17079-8-git-send-email-rppt@linux.vnet.ibm.com> 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 03:22:02PM +0300, Mike Rapoport wrote: > +Memory Allocation Controls > +========================== Perhaps call this section "Memory Allocation Flags" instead? > +Linux provides a variety of APIs for memory allocation from direct > +calls to page allocator through slab caches and vmalloc to allocators > +of compressed memory. Although these allocators have different > +semantics and are used in different circumstances, they all share the > +GFP (get free page) flags that control behavior of each allocation > +request. While this isn't /wrong/, I think it might not be the most useful way of explaining what the GFP flags are to someone who's just come across them in some remote part of the kernel. How about this paragraph instead? 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. 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``. > +.. kernel-doc:: include/linux/gfp.h > + :doc: Page mobility and placement hints > + > +.. kernel-doc:: include/linux/gfp.h > + :doc: Watermark modifiers > + > +.. kernel-doc:: include/linux/gfp.h > + :doc: Reclaim modifiers > + > +.. kernel-doc:: include/linux/gfp.h > + :doc: Common combinations Would it make more sense to put 'common combinations' first?