From patchwork Thu Jul 26 17:32:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10546283 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 52542112B for ; Thu, 26 Jul 2018 17:33:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 445CE2AB8B for ; Thu, 26 Jul 2018 17:33:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 387CF2AC74; Thu, 26 Jul 2018 17:33:16 +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 CFEE42B560 for ; Thu, 26 Jul 2018 17:33:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C545D6B0274; Thu, 26 Jul 2018 13:33:12 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BDB796B0275; Thu, 26 Jul 2018 13:33:12 -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 A555B6B0276; Thu, 26 Jul 2018 13:33:12 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi0-f69.google.com (mail-oi0-f69.google.com [209.85.218.69]) by kanga.kvack.org (Postfix) with ESMTP id 7BE966B0274 for ; Thu, 26 Jul 2018 13:33:12 -0400 (EDT) Received: by mail-oi0-f69.google.com with SMTP id j189-v6so1904886oih.11 for ; Thu, 26 Jul 2018 10:33:12 -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=nDJkqw+NiWI9NTy5rzHL1+ViXwcq7DcYO8Z2zLaa5BQ=; b=AAz/oflo9bFZV5YvMZAzLKn7YQldzsZHekXgD9k1iXmaGCnQjHVCD0iMXgICcCKkum 1q/LhA0o9mdB8UTWnB3IujTpzjQMl4BMiZZCJNDwR93tYl0P46KL82G2786NTCT4Odzp NB8FVpP/zDutUhfhQ6sjU3a+sh08ZjSLxd5yB9PBXGUyI1dfWj/3NJH+TZtfmX3NG4sz 9TjN1+cplV0WoBsc/saViazYegWhxHnVgRqRx1aWiabruwx6ciZQxUC462KHVdVNJzIH Vc3hzrhkaYEtOYNefWhjVgn4B0Op6hmeoXQhEiqUE3PzT+JDBoNpFgIc7pI77JNhdftu Aq/A== 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: AOUpUlEzjt8ZcexuUbdrVgCnhbOUOW56eM77oqXQxpvyrXpHw9ODmVls hF7bcK4KbIWqF3dW4Tz50NiANtCuBaX3Rd7L60V+VHmlPKgjqwKdrmeTVy5VigleHBb8Rve4Kko t92KfdI3NxWsE56rDwwEDSnREjPSy7bxwDpZjfodS8DQUMSjMw/scDUvW7+q0FHc= X-Received: by 2002:aca:3e83:: with SMTP id l125-v6mr3055380oia.64.1532626392293; Thu, 26 Jul 2018 10:33:12 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdX2NUzUHjtTJLDkYauqtMRkOLWoOsgu3ikUBHxqxeNDjbgRqE0EQjxyckrh0Fr28u1mmgF X-Received: by 2002:aca:3e83:: with SMTP id l125-v6mr3055283oia.64.1532626390829; Thu, 26 Jul 2018 10:33:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532626390; cv=none; d=google.com; s=arc-20160816; b=GcU+mFImi7yiDFq39ckdPQzCHazCYZu8AuGC1nsGtlsbEOpUkAnGeptsVMhQjxhhbK PPZpxM8xfe+LLZM8HQm/erJZienhYHH8sZ0nAL5J+fZguraS2Q5akqvKsODDJ+0hCU91 VLFAbG4k+bgsNjaQT8JXjH6sdQTX/nb0wOfsjFbJYdaOEosElhXcAI1ZmQaagBgBPYc3 hRPOuQlKY2eYRW14UgBY9YvJ39Bm6KhgPOQIyLyHuks1GbYiPQajnS7U9qqCsBNfFh9S vOM3kvOVo4+w5i8lBFNkpKc2KUkPeOWaz/QJwvRRHmrMkwjJhsNZRdD7d4x1oRKnxMrH e5Zw== 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=nDJkqw+NiWI9NTy5rzHL1+ViXwcq7DcYO8Z2zLaa5BQ=; b=JtAPHfn4iuSiX9m2POUwWDoKPMm7dAuOzAXdRoVnMScO7/xLYKhqAAv2rqQColWAPK r9orLwU1HH/B9VaPfhZQZs9bwxXLEQGqS28RruPPY4aapqKPgnCTRZjdAc1HNpBw6ycz IMN8xlNQPCQR0jAvdUtfSZFRHN7zriNz0hOVlNyGhfjsbxEldDHCWIaoreSo8t8APmgZ xHALYISaDRY140h8REYBX3LsdtXU1rw1vFW929KnjAcyUtx0BlxhP+FJUjxgBuBkprar 0Y0XDK6P/i3kIPYz3K875VqJadGuwlDRs8laeWqUhYnFNNmUMrb/pP4RkBKrFv63VsBn nBSg== 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 m83-v6si1339711oik.0.2018.07.26.10.33.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 10:33:10 -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 w6QHSodn015106 for ; Thu, 26 Jul 2018 13:33:10 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kfhj3be8w-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Jul 2018 13:33:09 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 26 Jul 2018 18:33:07 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp01.uk.ibm.com (192.168.101.131) 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 18:33:04 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6QHX3hT39125130 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Jul 2018 17:33:03 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A5576A4051; Thu, 26 Jul 2018 20:33:16 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C75C3A404D; Thu, 26 Jul 2018 20:33:14 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.204.214]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 26 Jul 2018 20:33:14 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 26 Jul 2018 20:33:00 +0300 From: Mike Rapoport To: Jonathan Corbet , Andrew Morton Cc: Matthew Wilcox , Michal Hocko , linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: [PATCH v3 7/7] docs/core-api: mm-api: add section about GFP flags Date: Thu, 26 Jul 2018 20:32:40 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532626360-16650-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1532626360-16650-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18072617-4275-0000-0000-0000029E6E4F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072617-4276-0000-0000-000037A672E0 Message-Id: <1532626360-16650-8-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-26_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=870 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807260180 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 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Documentation/core-api/mm-api.rst b/Documentation/core-api/mm-api.rst index b5913aa..46ae353 100644 --- a/Documentation/core-api/mm-api.rst +++ b/Documentation/core-api/mm-api.rst @@ -14,6 +14,27 @@ User Space Memory Access .. kernel-doc:: mm/util.c :functions: get_user_pages_fast +Memory Allocation Controls +========================== + +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``. + +.. 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 ==============