From patchwork Wed Jul 25 11:26:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10543865 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9222617FD for ; Wed, 25 Jul 2018 11:26:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 812C929960 for ; Wed, 25 Jul 2018 11:26:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 753F329A55; Wed, 25 Jul 2018 11:26:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 192A129960 for ; Wed, 25 Jul 2018 11:26:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4A7316B0293; Wed, 25 Jul 2018 07:26:36 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 430EB6B0294; Wed, 25 Jul 2018 07:26:36 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0FC9D6B0295; Wed, 25 Jul 2018 07:26:36 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi0-f72.google.com (mail-oi0-f72.google.com [209.85.218.72]) by kanga.kvack.org (Postfix) with ESMTP id D8B046B0291 for ; Wed, 25 Jul 2018 07:26:35 -0400 (EDT) Received: by mail-oi0-f72.google.com with SMTP id m197-v6so7140764oig.18 for ; Wed, 25 Jul 2018 04:26:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:in-reply-to:references:message-id; bh=ByNu2pRirRqKgFzNHUK6phfE5DOCImJ2REERDFg+THQ=; b=oGQsBo821QE+bz2HVSCvCDJ8Ox7c4BRHpQl8Kb5px5xzVfTqiWNomuwfiwe2uyis2i MEzGNrnIEwheOCAXuBkqBlBT4mXycdgaNt7pE+uKWys3OaQ1tosr5e8MApklDgZWI09Z rOIPR1C2yVKO8oLEfT4H1g9y+rV7ywbPa53nw7c3e2VjawgQIFrjcrg2B2M1OkN6RCue v9Wj35MsssnfoFz1RT/nwMbTM/oWXWxQkrvgodOea9+c58PrnXlrdPiHwUh0qUffWi3J /FjEfBtEBNL3KCSaHBJJ73uLYAoQq9cpaSp4WaE4NcmOhFbsMFqbWmWrxHQETxx74oho 8C+w== X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com X-Gm-Message-State: AOUpUlFsxFs+pJSSTJPTvKu8zwvH47EzCUSY1CMSm/CZqwTYm/mWVPdu YD7aNswVhMd4War2uXw1PGehYQ5sZinBbGPKVql6kjjdrjaGP0tk1SarKO++X1JUF+oUB8hT3J9 QzLdx++lQX7U7Pu9yH9PXOw6lfjY0tVyj2U5qLpYJf2YZyWopUt7BCG30lnmT5sY= X-Received: by 2002:aca:af11:: with SMTP id y17-v6mr2723397oie.274.1532517995664; Wed, 25 Jul 2018 04:26:35 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeyhOTPUQwOEIQ5/PZDAajVbcxDIg7RQXQXkHEQWH1j6wHDxQ1qn4Dd8jHkDI/i0ZLWLWGq X-Received: by 2002:aca:af11:: with SMTP id y17-v6mr2723366oie.274.1532517994999; Wed, 25 Jul 2018 04:26:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532517994; cv=none; d=google.com; s=arc-20160816; b=iLOcbnjuchs0gMHhT0jYPSE8A8yJomV08SYgMV6JPte2HNG8yX1l3nzXqAT6780TDN YR8hy+L802M8+PKAQjHhL2QXMk/QFjXcDkpDmJOdvGuVkmC856PI28KTQoDhcTSLRuAX 2i6xj+xFqCAg6ukOjJaHu+SpbnNIHzCusAN+zrliyFQaTY9hGvJGmy19yXLkqNxAUHta xkY2CkzU93IxfVkUKSESxYPaXa/0rH+hiDil1Ib+KVSczCsbQvnW0i4r3vhBvzMxF5bx LvcnCchdgSK6QZRhfKGNoScQ/ifRT1T9tagLvr4jlNLgV1HmoMmtoQqNVtdpt20FYy5r F/xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:references:in-reply-to:date:subject:cc:to:from :arc-authentication-results; bh=ByNu2pRirRqKgFzNHUK6phfE5DOCImJ2REERDFg+THQ=; b=m+uCzsSiH9EqEp/Mym/4pjUpjenNkPPY6PYWwvjJ8MqnJezBWfuclqH2GZ9o892MhB B3v+UpMQ7gDfuR+2SDITYYozEhw8DZm2wzblE6yPmMdsOADAbKlfOy1wPgxTfJMTSDT9 7RmLbwaNwvRUFdEXo83R98QO66Sa6xgKMnmqEf/eUZCManbz17p4UmNUaRIRfDWUa327 LRLqaqGz5cNC7/qQehwk81fOD5MvGB5qx/OcNLELsSBtHy47ZtrdSHwg9FWgte38TAIC SMxSbuw40sEie67CUw0BFFZ0GzQVm4FbtsveALw+kLvt464n374kcUNo2yuCTH67hxMw f8sg== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com. [148.163.156.1]) by mx.google.com with ESMTPS id s7-v6si9307983oig.299.2018.07.25.04.26.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jul 2018 04:26:34 -0700 (PDT) Received-SPF: neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) client-ip=148.163.156.1; Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6PBPnVi037683 for ; Wed, 25 Jul 2018 07:26:34 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2keqph9s3x-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 25 Jul 2018 07:26:33 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 25 Jul 2018 12:26:31 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 25 Jul 2018 12:26:29 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6PBQS1w36831476 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 25 Jul 2018 11:26:28 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D2ED011C04A; Wed, 25 Jul 2018 14:26:42 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5C1F111C050; Wed, 25 Jul 2018 14:26:41 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.110]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 25 Jul 2018 14:26:41 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Wed, 25 Jul 2018 14:26:26 +0300 From: Mike Rapoport To: Jonathan Corbet , Andrew Morton Cc: linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: [PATCH 7/7] docs/core-api: mm-api: add section about GFP flags Date: Wed, 25 Jul 2018 14:26:10 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532517970-16409-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1532517970-16409-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18072511-0020-0000-0000-000002AAF0BB X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072511-0021-0000-0000-000020F789FF Message-Id: <1532517970-16409-8-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-25_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=958 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807250124 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Mike Rapoport --- Documentation/core-api/mm-api.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Documentation/core-api/mm-api.rst b/Documentation/core-api/mm-api.rst index 65a8ef09..1e8c011 100644 --- a/Documentation/core-api/mm-api.rst +++ b/Documentation/core-api/mm-api.rst @@ -11,6 +11,28 @@ User Space Memory Access .. kernel-doc:: arch/x86/lib/usercopy_32.c :export: +Memory Allocation Controls +========================== + +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. + +.. 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 + The Slab Cache ==============