From patchwork Fri Aug 17 14:47:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10568963 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 7712B15E2 for ; Fri, 17 Aug 2018 14:47:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A3C82BBF3 for ; Fri, 17 Aug 2018 14:47:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E02C2BC06; Fri, 17 Aug 2018 14:47:32 +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 4508C2BC05 for ; Fri, 17 Aug 2018 14:47:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 763DB6B08B8; Fri, 17 Aug 2018 10:47:30 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 713FD6B08B9; Fri, 17 Aug 2018 10:47:30 -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 5DCE56B08BA; Fri, 17 Aug 2018 10:47:30 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by kanga.kvack.org (Postfix) with ESMTP id F07536B08B8 for ; Fri, 17 Aug 2018 10:47:29 -0400 (EDT) Received: by mail-ed1-f69.google.com with SMTP id i26-v6so3287671edr.4 for ; Fri, 17 Aug 2018 07:47:29 -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=BDkFQx7qYQ3xAhNnbac8FoFhsxBNCRuocWjpMSFmz/U=; b=mfmQAMnSxgMwXV9ldizsgviCC7Gnic7Tnw84V4Pg4S3cQ6+7wrIx3LP4h7e1bwNBWg 2zl+tk/Tt+l4xFFkBenL1yYJIpqPbyMNQd11ZDRphRnuIkf4ZCHOhtRal8WERsvivOc0 98/6PBTgxCiDOFZT1qghoNM+edoL/qqzRL5Pbln2gVRybsa2k9qzrnCsjgp5dgbm2SS0 7nsL3bHAwz+6WW5tAcVJADK3vUQh0n37y7aENAWtaeiLmR8k1PqNT/o+euqKPkyRUok7 JIk3asjvTIGMgs70bYIiAAQjjqMZBuL3jbuVe6s/L4amm0dBl0+LGAKLm7Sm7rg9yqCe RAUg== X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.158.5 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: AOUpUlEXEQUd9Xeb6EsNWyM9NabqsTXDIMiomm8SbvAIw1MtGLPMh8hQ xz8s1s1bXq9D1y12ttWNRu3HxIQpYq22AffSuVQAP+O8Ca2rundznnEw+KECylSg4z6xfo2cb41 Inq0frqEDvbQ+fygXrD41lc8A+KnoE2CGVeXD4aSfBjIwsjMgnW9GQ5jworBOlz0= X-Received: by 2002:a50:a305:: with SMTP id 5-v6mr44403337edn.57.1534517249384; Fri, 17 Aug 2018 07:47:29 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzYLIUAL4ZvMjByoaK0oV9oBwh995KePylNagR9ekiR6LVCKBGBsWyIACtF6UOq8FRv055f X-Received: by 2002:a50:a305:: with SMTP id 5-v6mr44403280edn.57.1534517248555; Fri, 17 Aug 2018 07:47:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534517248; cv=none; d=google.com; s=arc-20160816; b=BGIV8HtfIKuiXW9vhPAJhGjUX1W1x5l6krd+iw/7zn/+9n0AiHw3x8gERmluFgMqX/ CIOu+9bqmmUMTQoIwWVOuzxH02G+zyhcbtV9HdnXH5AoRp85nvf62xiNlPs+LLWaDMoN LF94KvY69MZ2tqCVnrLMRK88XIldkiq0sqMB65yz6BMACHKIHeeVtOMjossWbd5LNexo zafcOdln9FEod5Jgu/rwFodUUiMUympFh+HU4koKK6X54FVpi9DnrjfxqA45yNZQ4zHF /zccfBam4eFyvWrncJbP3em6BjG0cwQP+SNsstWifzaojCakqs4ShO3LvLMjK9h4xkZM IDzQ== 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:arc-authentication-results; bh=BDkFQx7qYQ3xAhNnbac8FoFhsxBNCRuocWjpMSFmz/U=; b=lfkV/sKwIpQz0CHuluyrR+LiqzAO/tMNL2yWGvbmLKTazGXeSNuJwTGuSOES+3vYbZ SlkG1IYRKIsLJ66GpGjKEhb4sLz+tOHhR71XHgAw/BwHxaiSJFAofaQdpchaUlApreBr O50+WIfUo1VQk4Lf9nAK5lvkEs62A9J1YSyAAJR+MseXCmAa/f/wz8tgZA1SsPzY6dON hkQ/hpMNQ7+0915z0rVMsxcpWg95kqzAGnChbUMHVwbcngvvWOLg3w5jOqeTe0CZy7mP vwQKX3YtwSpjvUzpuBefoLwjLQ7wq3ndbcyjDMnWud8uCj9wiQdyTmPQ4sSu9U30942t inPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 148.163.158.5 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 (mx0b-001b2d01.pphosted.com. [148.163.158.5]) by mx.google.com with ESMTPS id 89-v6si2820300edr.430.2018.08.17.07.47.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Aug 2018 07:47:28 -0700 (PDT) Received-SPF: neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) client-ip=148.163.158.5; Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.158.5 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 (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7HEiBK6097746 for ; Fri, 17 Aug 2018 10:47:27 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2kwxamdhw5-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 17 Aug 2018 10:47:26 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 17 Aug 2018 15:47:25 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 17 Aug 2018 15:47:21 +0100 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w7HElK8Z24510492 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 17 Aug 2018 14:47:20 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CF29D42047; Fri, 17 Aug 2018 17:47:24 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B21B34203F; Fri, 17 Aug 2018 17:47:22 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.205.113]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Fri, 17 Aug 2018 17:47:22 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Fri, 17 Aug 2018 17:47:17 +0300 From: Mike Rapoport To: Jonathan Corbet Cc: Michal Hocko , Randy Dunlap , Matthew Wilcox , Vlastimil Babka , linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: [PATCH v3 0/3] docs/core-api: add memory allocation guide Date: Fri, 17 Aug 2018 17:47:13 +0300 X-Mailer: git-send-email 2.7.4 X-TM-AS-GCONF: 00 x-cbid: 18081714-0008-0000-0000-000002633A12 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18081714-0009-0000-0000-000021CB6A31 Message-Id: <1534517236-16762-1-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-17_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=768 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808170160 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. Note that the second patch depends on the mm docs update [2] that Andrew took to the -mm tree. v2 -> v3: * s/HW/hardware [1] https://www.spinics.net/lists/netfilter-devel/msg55542.html [2] https://lkml.org/lkml/2018/7/26/684 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 | 124 +++++++++++++++++++++++++ Documentation/core-api/mm-api.rst | 2 + 4 files changed, 129 insertions(+) create mode 100644 Documentation/core-api/memory-allocation.rst