From patchwork Thu Jul 26 12:22:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10545703 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 71D2A112E for ; Thu, 26 Jul 2018 12:22:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6039E2AE5C for ; Thu, 26 Jul 2018 12:22:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 544942B11C; Thu, 26 Jul 2018 12:22:35 +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 E4BEB2AE5C for ; Thu, 26 Jul 2018 12:22:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E314B6B026A; Thu, 26 Jul 2018 08:22:28 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id DB6236B026C; Thu, 26 Jul 2018 08:22:28 -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 BB82E6B026B; Thu, 26 Jul 2018 08:22:28 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi0-f70.google.com (mail-oi0-f70.google.com [209.85.218.70]) by kanga.kvack.org (Postfix) with ESMTP id 886DD6B0266 for ; Thu, 26 Jul 2018 08:22:28 -0400 (EDT) Received: by mail-oi0-f70.google.com with SMTP id u74-v6so1214879oie.16 for ; Thu, 26 Jul 2018 05:22:28 -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=UXTpteTlCI/K3ki98mJpOjg2OKCDr+IMEUcQByHixqI=; b=Vw3Uv+6rqeqLFhLUlllAFGiGEaqbEoatSTGI+kkJtAvAPyfUVQ9VWXsvurUrW/PGlY TPynFI3ilYbeDgj3m8z2YKY1Yxap4L0NPYwxbmDMa75NihLYxPr7+QiSeV8iDPqnOgzM k9fLdHdqQiuHO+05WrcT9FUlDr+0Bg+AkNOiT5RkTN3er3DfzisWaRz/73qNYyaHN/x/ BQoOwHUJNMFxXU0H9KlEuLTcv9qRYzBVotKQruwNaGBp9rZPbJYS9RKcL48i2zXzcf0/ e2SBg58tdliOquDAZn+DCoku7GvlW0rdkW9x+RrCtRipjmTT5ClwKhN3xdYn8vzPTi4v ZJyg== 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: AOUpUlGs1gBH4cpjg7xqcbh5TK5HoflQU+Jh4zaYj/Qr3ANLaBD8Xc8D Kb0++uQj5oF5LbKZMOLUktHV9UCm9xX8Z3pv6yFqY3iY5ZwQnolXxh7q4ROL1mUGh/W5mCUxryx xRKf8aZR72m1eMzziA3wMICYQ+Cn2Jw2BQrlrguiNc5vwzl0R6dD/VmBkFASSn+Q= X-Received: by 2002:aca:90d:: with SMTP id 13-v6mr1839139oij.300.1532607748354; Thu, 26 Jul 2018 05:22:28 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcoOsqN0elmc4uSrU+d/zMvq2VFjysRd3AUCL+DN4LQ6kGFzHikK/Xs1eOqmujYJrQ3pKun X-Received: by 2002:aca:90d:: with SMTP id 13-v6mr1839087oij.300.1532607747586; Thu, 26 Jul 2018 05:22:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532607747; cv=none; d=google.com; s=arc-20160816; b=IqlIRBnwAEfr3KAxzw1TgOxG5cE5/oQsSNXkYpiRILu5zIxOX3CaqlO656ZPHafDSt ja+OBZbcT/6zN25DJ4h8Qqi/Ya3bucIvgfblNMD7GHA+WJXAJ6ycs/WSAyAV1cVoNPTe yAkasgTb36giZP507MxJJ+DB2Ba0oR4PiREp2LN9Spwviu3Q8llAMKBrlzhimQa045ke tqTHOSDjevz5Nbyb1zIkskvEDUcqBL3bAMArywvJu7A6aJ8odGjpJHaIjoekgQrjk+a2 DbJ3OlEas/ocitW2rJC434scRIyVVN5TebYlDpNAdtqiyWb6b/DJDOu9Gm18ULrbieb/ +1kQ== 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=UXTpteTlCI/K3ki98mJpOjg2OKCDr+IMEUcQByHixqI=; b=FmgWSSF+Oyo0JtsWjHyQSA6Zzwb04ZYTqnINOj5h0Cg1fFQl7yBbAblsZj7tXYUoG/ sSdLogSBbsI7F4PrbzVI8EWvx1jvNBi8UT7eGYpvkCLJoN/ud4BHakIQgOz9GSqJumF8 e/7X0BB0/Cy6gXiOQU/Jbb4WCul248x6LdCLN0hhEQxe2XvWqboORsg0Pt1OQaDQLK2t 2xLHUA6AYOgqQKMABBOcAN6tyWDzCYemtszn7iJpxkKSN19Ub8HrfWTcWLAQpZ3zzfAq /+kZZPkhwmceXvey+Zu8YgYyKz4CKK59lhsSYvCBj+JO5/7bu+k2/+kkH+6QSfL5Xd7W +tEA== 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 t2-v6si828275oib.16.2018.07.26.05.22.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 05:22:27 -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 (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6QCJHMC133517 for ; Thu, 26 Jul 2018 08:22:26 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kfe1k8jf0-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Jul 2018 08:22:26 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 26 Jul 2018 13:22:24 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 26 Jul 2018 13:22:21 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6QCMLQF42467568 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Jul 2018 12:22:21 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7226711C050; Thu, 26 Jul 2018 15:22:34 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EBF5011C05C; Thu, 26 Jul 2018 15:22:32 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.177]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 26 Jul 2018 15:22:32 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 26 Jul 2018 15:22:18 +0300 From: Mike Rapoport To: Jonathan Corbet , Andrew Morton Cc: Matthew Wilcox , linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: [PATCH v2 7/7] docs/core-api: mm-api: add section about GFP flags Date: Thu, 26 Jul 2018 15:22:02 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532607722-17079-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1532607722-17079-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18072612-0028-0000-0000-000002E08D44 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072612-0029-0000-0000-000023987EB2 Message-Id: <1532607722-17079-8-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-26_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=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807260129 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 b5913aa..3d2a7ec 100644 --- a/Documentation/core-api/mm-api.rst +++ b/Documentation/core-api/mm-api.rst @@ -14,6 +14,28 @@ User Space Memory Access .. kernel-doc:: mm/util.c :functions: get_user_pages_fast +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 ==============