From patchwork Fri Sep 14 09:27:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10600565 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 EDFB614BD for ; Fri, 14 Sep 2018 09:28:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEC272A323 for ; Fri, 14 Sep 2018 09:28:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF7992A386; Fri, 14 Sep 2018 09:28:15 +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 428372A323 for ; Fri, 14 Sep 2018 09:28:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 286BC8E0002; Fri, 14 Sep 2018 05:28:14 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 237008E0001; Fri, 14 Sep 2018 05:28:14 -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 0FF928E0002; Fri, 14 Sep 2018 05:28:14 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) by kanga.kvack.org (Postfix) with ESMTP id D39FD8E0001 for ; Fri, 14 Sep 2018 05:28:13 -0400 (EDT) Received: by mail-ot1-f69.google.com with SMTP id t46-v6so3253141otf.13 for ; Fri, 14 Sep 2018 02:28:13 -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:message-id; bh=5clQw+lMZGKuMmfrqGECBEV6H/aXFNB91zqLAMNkVdU=; b=Pf46bvt2p41DjbX82gC6Hb9MwYWWqGV8WC9UAIKUotbjWvx9g+OeyhbPKia2XC5DXG +RnrHCubkw7WKxh6tpQawM1KM/H1jsdJDbEvkWSDsFFORmdZffAV/iTc3KJ9UCu4p4pE xyqcZWnPM2tsrkJ4q4AVrJYOuSeyEIZrE5/R7HNecT/qPnPtfs0Iu7slZYyw0FcoZnqE f0PcpB4t2HSeHiXf4Uw/+wgYiLa9td/8dtsBVQ6z5f2NI/Ocyr37xN8CMyOp6CJZEkLd DwSjvajvDmtFTa2V5+kxBV8VLEdCSxQzcABceuA2pWofBihmrGhLL2pjAHwj1qyXOm/S dsiw== 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: APzg51BduvF8WtYy7/iRxkspLcW6cyNjYC3IYIhZO4bdjGoh8tg52w90 KhZn3I27G1Aols1nHqN1EYi2oQyUv7XGox3Dk60BPlLONmCNqhnen02CdulA/tjhX5sWFOrSiFp Qh8ZeIae5aI0190FvxyotGQbwjsJHD71GPkPGB/K4ZIXmqZZVKOIuJRvqvvclZn0= X-Received: by 2002:a9d:4887:: with SMTP id d7-v6mr3803276otf.94.1536917293513; Fri, 14 Sep 2018 02:28:13 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYRK7zR65Cqz29EHsGneqjvyWo9jo+2W0Yt9uHVVYKBWJfZkwm+O8shxNlClmECTmWFeC/u X-Received: by 2002:a9d:4887:: with SMTP id d7-v6mr3803245otf.94.1536917292282; Fri, 14 Sep 2018 02:28:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536917292; cv=none; d=google.com; s=arc-20160816; b=jo31dbTtHCEmRNaduSJZ0PAZWqQQAymKGHKsm3apwkoxLJA+RBVzyOyhwbMWtqHTcg s8mVGDty6YT5WMrtL/2EMUqmUKnHVfbnuFX0hCzokmfyI0aq9UoPRDoqElFWW1RaDAaM 1T+zGmSH29Rg5TYez45ewrXxB5PRSBhb2N+LDeOrLozyy/U04HU7AVKFhr16azqC2HkK 88Tv7a7FFnO1XNxjfNHyE3027HWLdOkIEH7eAkp+fCo0dnmF+/NJkcein23n6D6mpX/T 8ey4nU82n9rlnawQWc7SGkC4uf4xzoI/nmbTP7sAwd4ODLYjvxruUQai9Bw+PHTTIvFI 3dmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from; bh=5clQw+lMZGKuMmfrqGECBEV6H/aXFNB91zqLAMNkVdU=; b=wj6GK5q2JVBeYnY6mDLCJ5BzqM11hb2SKH17Ddx+6kROSZkLlYTI3tEib0QtDt06D/ Q6kOeu/yV4fi+hpk9N41VmU3d9XJ0w2oPwEILQx9RYibutz70T/ntM8DHUsYH7IhABdD BHWMK7xw3oWTkltSl0Da/ovylmHJ+XOLWAerUsL/XXuAmHpDIyD+cJtwet4jT1/KZ7kj 7zZSrBVFkkRvTlgVSz7JnvxD1ukyhKeNdteDIEAEn99KHmQjVTD8j3fLwhtzW5a0esmU qmX5QSb+ARNjSYBsm5v5YkRBBukDolgVnZ+EmYsW0sj27AdvYbWpDaibEaTQNuqooQk/ Ah0w== 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 y207-v6si3455963oia.346.2018.09.14.02.28.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Sep 2018 02:28:12 -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 (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8E9O5m6048438 for ; Fri, 14 Sep 2018 05:28:11 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mg9yy94eg-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 14 Sep 2018 05:28:11 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 14 Sep 2018 10:28:07 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 14 Sep 2018 10:28:03 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8E9S2vR1376560 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 14 Sep 2018 09:28:02 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9BBD452050; Fri, 14 Sep 2018 12:27:50 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.207.116]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id C4F665204E; Fri, 14 Sep 2018 12:27:48 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Fri, 14 Sep 2018 12:28:00 +0300 From: Mike Rapoport To: Jonathan Corbet Cc: Matthew Wilcox , Michal Hocko , Randy Dunlap , Vlastimil Babka , linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: [PATCH v4 0/3] docs/core-api: add memory allocation guide Date: Fri, 14 Sep 2018 12:27:55 +0300 X-Mailer: git-send-email 2.7.4 X-TM-AS-GCONF: 00 x-cbid: 18091409-0012-0000-0000-000002A8C421 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091409-0013-0000-0000-000020DD0E27 Message-Id: <1536917278-31191-1-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-14_04:,, 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=781 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809140101 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 Hi, As Vlastimil mentioned at [1], it would be nice to have some guide about memory allocation. This set adds such guide that summarizes the "best practices". The changes from the RFC include additions and corrections from Michal and Randy. I've also added markup to cross-reference the kernel-doc documentation. I've split the patch into three to separate labels addition to the exiting files from the new contents. v3 -> v4: * make GFP_*USER* description less confusing v2 -> v3: * s/HW/hardware [1] https://www.spinics.net/lists/netfilter-devel/msg55542.html Mike Rapoport (3): docs: core-api/gfp_mask-from-fs-io: add a label for cross-referencing docs: core-api/mm-api: add a lable for GFP flags section docs: core-api: add memory allocation guide Documentation/core-api/gfp_mask-from-fs-io.rst | 2 + Documentation/core-api/index.rst | 1 + Documentation/core-api/memory-allocation.rst | 122 +++++++++++++++++++++++++ Documentation/core-api/mm-api.rst | 2 + 4 files changed, 127 insertions(+) create mode 100644 Documentation/core-api/memory-allocation.rst