From patchwork Thu Aug 16 13:03:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10567415 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 8A31613B6 for ; Thu, 16 Aug 2018 13:03:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 776CD29F39 for ; Thu, 16 Aug 2018 13:03:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6ACE82A663; Thu, 16 Aug 2018 13:03:55 +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 D41A129F39 for ; Thu, 16 Aug 2018 13:03:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6E32B6B0005; Thu, 16 Aug 2018 09:03:53 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6B8B26B0006; Thu, 16 Aug 2018 09:03:53 -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 581CA6B000A; Thu, 16 Aug 2018 09:03:53 -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 E85576B0005 for ; Thu, 16 Aug 2018 09:03:52 -0400 (EDT) Received: by mail-ed1-f69.google.com with SMTP id y17-v6so1842718eds.22 for ; Thu, 16 Aug 2018 06:03:52 -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=PT00oGTOLUgUATW8DmY+J/+R/m6nRf+v9gxBrTQd+Qs=; b=EK3hKSVBk7nKEE+X7tjLSmzis3uC1eQV7dBb/c384wCH5GTnZN8zt6WAYwYpnaHxil E5zZZFKuW1g0vpFL06a98nHCKCiBCUXWvpQde6zjL03manBG7xRxCFyxwqYchC2hSYCl 0yjgS0qDlIiPRrs/tRF28+q+UzoD7iSiTbWwJcWTK/oRZTj84suvtw1zVjcs9iibgnKP xVKG3cOswX0ZIdaYcOa3p/115hM24QBRIpHQiPlYWA5AlK8VjdAN9d3Lc0XN9Bhp5FZO 8Vg1ffY/4E19+3C7DhuqL0AXc2llZCIrdJy3T6gH60USR0zt+fQvWrH/BBEuTbOa52n1 5sVA== 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: AOUpUlEsGmXgv8sSTQYEtQFf2xnTd975e1bIodwMtQf5W1ttEgX8algz IE8y1y3ncK7/TqX0/uiu+ipvOZgG2q3ymKOXcH/PUxGbm7g4vfQcHodpK/BlG1wNUCq10Cxa+Pc jBQau5hWe1Xu0nmDLxuU8mjyjwdmmccLUo4z3kJ2eYPqIN13GLbXdJ20pQ+u6v2k= X-Received: by 2002:a50:afa3:: with SMTP id h32-v6mr37147145edd.129.1534424632351; Thu, 16 Aug 2018 06:03:52 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxyGzOtQOjTi9PYa7TPtZFUoJnMPGcI2EliZVHksCymEgWAtbpd7GngPO5fuqyaSHk9lNoI X-Received: by 2002:a50:afa3:: with SMTP id h32-v6mr37147070edd.129.1534424631462; Thu, 16 Aug 2018 06:03:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534424631; cv=none; d=google.com; s=arc-20160816; b=ED7GstwSD9mMa0DZOGIHOkH+HJ6uYtkVpeAapwhHAYULbT3BjVU1fRJPv8R2IikqjW YziN0WGpJFvD7ZMcaEBFelnO0O8k07CCdc/SuJT7FU/BZIm4vA1BZ69I8INQmDYL3eZ7 wrh3bGjzcfZh140ZxUTWpi4wihDww1Lrowf5850ZzjuR/TYmh9aevDetUigIb+6gwqxK YqJ3IAS/Wpkg/ec7J56SnQOctneAiny52XRvyQR3nkMS59EUtnl6PuFDVVOtdlwYokuO P6VWWKfJa3YdgqOhewdyPROi1tR5e0Qon+qWN+IHm7XIIPAJnZ5z0qlQpavSCbG6KZ/Y /VeQ== 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=PT00oGTOLUgUATW8DmY+J/+R/m6nRf+v9gxBrTQd+Qs=; b=KBioT9X6932BQjsbGbvtBeXP++fD2txV9DosmXTgztFhyh5fj9Z8rWQg3y6Mx9Tmv/ pjegr1U6dU+gJl81iYUgw6x9y6l8bVMGSGGhe13ySq8z+Y5D2SBdm9e1V92NrIQctqp+ pQ4Qp8LxvZP0lXKmbAp38PDz2s3Oi8UvCvKX/5WB4DxsK4qGvLUfvQGErTYcc9vS21Oi atg4J50EN0hbJht0Ton4hiUksvWIk8yaJFx1EvCNWceJ9m5JdpnjatiV8A38QN1xSNE4 9ZhC+9m1aO47OW03QR7EB7dIw45gQ8kxZMmE4HOLl5pk+0R5xFOlSv4znI1SzGGrgkZG FA/A== 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 d10-v6si889260edn.311.2018.08.16.06.03.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Aug 2018 06:03:51 -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 (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7GCxtQv084357 for ; Thu, 16 Aug 2018 09:03:49 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0b-001b2d01.pphosted.com with ESMTP id 2kw8g7bkf0-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 16 Aug 2018 09:03:49 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 16 Aug 2018 14:03:47 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 16 Aug 2018 14:03:43 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w7GD3gYX37945558 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 16 Aug 2018 13:03:42 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9E250AE064; Thu, 16 Aug 2018 16:03:26 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0647AAE057; Thu, 16 Aug 2018 16:03:25 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.148]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 16 Aug 2018 16:03:24 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 16 Aug 2018 16:03:39 +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 v2 0/3] docs/core-api: add memory allocation guide Date: Thu, 16 Aug 2018 16:03:35 +0300 X-Mailer: git-send-email 2.7.4 X-TM-AS-GCONF: 00 x-cbid: 18081613-0016-0000-0000-000001F7B1C3 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18081613-0017-0000-0000-0000324DE84B Message-Id: <1534424618-24713-1-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-16_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=741 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808160137 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. [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