From patchwork Thu Jul 26 12:21:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10545691 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 C95B5112E for ; Thu, 26 Jul 2018 12:22:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8D6A2AE5C for ; Thu, 26 Jul 2018 12:22:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD0F12B11C; Thu, 26 Jul 2018 12:22:17 +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 455FA2AE5C for ; Thu, 26 Jul 2018 12:22:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E9B576B0006; Thu, 26 Jul 2018 08:22:15 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E55E46B0007; Thu, 26 Jul 2018 08:22:15 -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 CEB146B0008; Thu, 26 Jul 2018 08:22:15 -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 9C36E6B0006 for ; Thu, 26 Jul 2018 08:22:15 -0400 (EDT) Received: by mail-oi0-f70.google.com with SMTP id b8-v6so1231350oib.4 for ; Thu, 26 Jul 2018 05:22:15 -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=TibzKu7s9JcVfBnBJfOYh4WY8gv2SH3SsOTziV9MyGU=; b=CK/4bQTDOlBQwoiwgefM0+8OWQab7qTUhaFTLIDJTn1u02zPSDxw+v3+4tf0H9433b to722MJPn7T/jbAlNBu5vGpD+D8pT7k0i3w4qWd5GRAFe8CbLWrJ3tXzHD2UnO5qgu25 RfY2rmCtifbiNEMjgKuJvaq+Zh6sSqt2LADTumtB5Is3+NmPK+G+mePJGe2TVtTsdy/A XDlzInl59QiD61erx5aKOZPyVKFkAqb2m+EO6xm87S7/umbvgcT/n4MImmACCNHpZF24 CRKoJ4g74LMKYnBsL5BYuZCxkjHV58R2sSkSgfi91zR+xnMmDJmIl2JxzQOhvIMMFNEH WNmQ== 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: AOUpUlHmdGCs6bdDa7HLYKWq5zQTJqY4mxh0mjknNnTtyMV40MSQKBDi +YLktKFO8kYTFQogrI6D8vyUALM5p56BFBmAlUN4dRIFzLdWL8NNG0jkGCddvrffHUwW/u/G4YB LT9X+CwXLbkaMMVQFS5iIdvG8Lz+z+fb1Ql/L/UihqFeYl+bpjKenU+35YlLMulg= X-Received: by 2002:aca:ec46:: with SMTP id k67-v6mr1802699oih.81.1532607735366; Thu, 26 Jul 2018 05:22:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe75EXFHcmLO5BRMq+8bB8k4QGn3j9g5sDL8LM07IiZMUPCRZbloLEJ8Xu/OlLQKaDq95Ql X-Received: by 2002:aca:ec46:: with SMTP id k67-v6mr1802641oih.81.1532607734337; Thu, 26 Jul 2018 05:22:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532607734; cv=none; d=google.com; s=arc-20160816; b=IpVIjQ81DOND7FoigHJhZstuxh1/7DHExMw6Tv3XZu2k1t55RJJrD/AGYjGBWOAG8K tg9eVZ2oZIT5DUF9u/hQxH5YKhmHfKArWxgW0rmGnP1doOYBcOZ1L9G1x8xgArZyU3N4 jqFbpylqfb9Ja8jIsaS7GIPPrIbb/+KgYOqG/5jqO2LoR1w38t04QktwfDyCFas0H+nK QPwndrQ/5ZTP8AkfQ+GOhNjo+IjEU0PFzr7/tzsxczRA07h3FbI5OPhb1WLL+LnRKnAh 3KNVljBVCyC1/a4LJgCeRma1/fPydvkWgxxjTpO/bMu+tzDUmry85Tt4OBz8SQDIAOcs E5HQ== 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=TibzKu7s9JcVfBnBJfOYh4WY8gv2SH3SsOTziV9MyGU=; b=kRyCAJyxPMcsOlIzY76FCjX/GCyR15v54cF0kema3vi9sTbmILcrsJxbVKP+TfjDIA 6rRZ9xuhyTA3xoYx0YDFXsyVh7i0PUdZbsIcxmmXBHhOjbh/mZHVulWk4NOEXd8OX1xi p9rxsnwwiw4LKIuiRRX1TwOke4afB9h/m/fLGTSdd5QFUbmyEIq5F26SEBlhL5zxnk3o Pa30Pwj3LYwULDKVWrSBBplFixDp/nmgEjLF1+tJ2eEHCgFVOmX4222zmrYb+YkEzHTd eu/mTMeVEDUNqfobPTWNeEZECnTfZviXY3FYQqBILVda0ogZlM0iQdai75cXQC4ZJALr f+0Q== 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 w72-v6si853956oif.253.2018.07.26.05.22.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 05:22:14 -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 w6QCJGRe133457 for ; Thu, 26 Jul 2018 08:22:13 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kfe1k8j5y-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Jul 2018 08:22:13 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 26 Jul 2018 13:22:11 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) 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) Thu, 26 Jul 2018 13:22:08 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6QCM7W241287714 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Jul 2018 12:22:08 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6BB7411C050; Thu, 26 Jul 2018 15:22:21 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DB4A011C04C; Thu, 26 Jul 2018 15:22:19 +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:19 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 26 Jul 2018 15:22:05 +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 1/7] mm/util: make strndup_user description a kernel-doc comment Date: Thu, 26 Jul 2018 15:21:56 +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-0008-0000-0000-000002580C68 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072612-0009-0000-0000-000021BE8B3B Message-Id: <1532607722-17079-2-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=761 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 The description of the strndup_user function misses '*' character at the beginning of the comment to be proper kernel-doc. Add the missing character. Signed-off-by: Mike Rapoport --- mm/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/util.c b/mm/util.c index 3351659..6809014 100644 --- a/mm/util.c +++ b/mm/util.c @@ -196,7 +196,7 @@ void *vmemdup_user(const void __user *src, size_t len) } EXPORT_SYMBOL(vmemdup_user); -/* +/** * strndup_user - duplicate an existing string from user space * @s: The string to duplicate * @n: Maximum number of bytes to copy, including the trailing NUL. From patchwork Thu Jul 26 12:21:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10545695 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 38A25112E for ; Thu, 26 Jul 2018 12:22:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 293B12AE5C for ; Thu, 26 Jul 2018 12:22:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D20B2B11C; Thu, 26 Jul 2018 12:22:23 +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 B27462AE5C for ; Thu, 26 Jul 2018 12:22:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E04676B000A; Thu, 26 Jul 2018 08:22:19 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D3F7F6B000C; Thu, 26 Jul 2018 08:22:19 -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 B41026B000D; Thu, 26 Jul 2018 08:22:19 -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 7B0AD6B000A for ; Thu, 26 Jul 2018 08:22:19 -0400 (EDT) Received: by mail-oi0-f69.google.com with SMTP id w185-v6so1217320oig.19 for ; Thu, 26 Jul 2018 05:22:19 -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=tsgWAzD/V/iTM9XVrNLk/H44DkI8oDZBWthlaIbs3ZI=; b=aOzbPiC16r6CaxT4N1VpY6ZHqAwDkW/+9Tj8v2yOIAdFca0gDqNmgdUEDG6Um4mScO eKuS0gexNZPZBLLltqIKKgVPMDIzUNHUCtGZ5Zk47KLVsPZlUYJ73QVDFil8ovOAdEhj Qy6GkAsCITUzpkafHorm6b/sEhf9iF3f5C/oDMHcvm/sMAdDcFN7DJGDe2SeDOvyH6cm rYikvkS7fjYHW0U4nl8JIjLcCR9C9GrZ6UA6APIptTI4ocRZ1SKDaA2i3YBQNGYV4D+f ayPLhNM3tzHEn8wPnXtQouP4G5LtLJFZtNDQjzsAGNebuejsUSN3ddvBr119DcZxNqzL ZTeA== 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: AOUpUlFKFEZaKvLknpezHX9I0CVu3r4MDRQfmWqmIhwy0NTwS3Lkqhjm KWeh8vRAVqwiDEPuFgUeOTrUXj7zb8CrCCeHe+kdZAWLBw9KZbpMM+TI0DwGG7XhNZTADdJVfjz jQkuaK5i8/gap6hjoKrZC+M7dsLGPask/rJ9yis/DUMwrxSf63T5uh7goEaRgPbg= X-Received: by 2002:a54:4406:: with SMTP id k6-v6mr1879971oiw.34.1532607739313; Thu, 26 Jul 2018 05:22:19 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcjOfc6EehdQMwkUeEjii+BFfpc91cbxkX5e0grvpptFbe/zPhoshKh4whk2IHT8x+L9Cz2 X-Received: by 2002:a54:4406:: with SMTP id k6-v6mr1879922oiw.34.1532607738563; Thu, 26 Jul 2018 05:22:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532607738; cv=none; d=google.com; s=arc-20160816; b=YdirolIiVrjCqBi6OyEsvoijOpyF7VUPmA2XBod+jsxDHes7OMqFDeMXKZFkg0R5ZT SoxLWu0uef3TXHZillYrCSO1o2IyU+y6XE1Os5kpGFtUUCz8ojNSkMeaADWCkD6fSCYV bS9+xlJCTAeAI/KeJJ94Ux/inKxAEf0Rj5Xdm3DzUiuPMw7sstGyLPhOJYOHlINsTqTI KkvR4cYWIViNnlrThlRS5j1HVknLqB54kUrF/R1s/+KQsxXMVIw3DUqozb40PJFo++z4 2rbGXHwOsw0sh/9u0rCbsrn/QSdfxzCoUadiMrgendihMzBj3XSHsjVpBXqMMTOX8ACe GWkA== 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=tsgWAzD/V/iTM9XVrNLk/H44DkI8oDZBWthlaIbs3ZI=; b=cHieo7GSz9Liw7Mrv9er+ifeHSNR5QO9RiRvu0L5ptlN/vTrXVw8RzbQGsWMlGMpyj 26vBV5b+cYs2TRMePMngEbmCANkwtBRrvRIZ68qrAlKj34p1He0I532tCTlRjX6l598m iyGtMdcpInTzuG115PgsJ7nrDPBHQf46PegHm8KKiZNaiZF2aDxgsQPvySJOgUgFLMmN IVvEtQ6+Vkv8AeiaHDI1kO9SZXN2Lyui/Uv4R3GDtAnpWOyY0U+Mf6v7s6ZxJ10NlSBf NahIDeSxibo4VhPpMCXFhZdIevEGmtBuMVfLUOkxtGce/PXF/z0I2Jx62WtAIb9F5/k0 nvIg== 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 l143-v6si786391oig.22.2018.07.26.05.22.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 05:22:18 -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 w6QCJFF0133421 for ; Thu, 26 Jul 2018 08:22:17 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kfe1k8j8w-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Jul 2018 08:22:17 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 26 Jul 2018 13:22:15 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) 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) Thu, 26 Jul 2018 13:22:11 +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 w6QCMAvP37421206 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Jul 2018 12:22:10 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 095FFAE058; Thu, 26 Jul 2018 15:22:17 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 79F1DAE056; Thu, 26 Jul 2018 15:22:15 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.177]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 26 Jul 2018 15:22:15 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 26 Jul 2018 15:22:07 +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 2/7] mm/util: add kernel-doc for kvfree Date: Thu, 26 Jul 2018 15:21:57 +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-0008-0000-0000-000002580C6B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072612-0009-0000-0000-000021BE8B3D Message-Id: <1532607722-17079-3-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=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=828 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 --- mm/util.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mm/util.c b/mm/util.c index 6809014..d2890a4 100644 --- a/mm/util.c +++ b/mm/util.c @@ -434,6 +434,13 @@ void *kvmalloc_node(size_t size, gfp_t flags, int node) } EXPORT_SYMBOL(kvmalloc_node); +/** + * kvfree - free memory allocated with kvmalloc + * @addr: pointer returned by kvmalloc + * + * If the memory is allocated from vmalloc area it is freed with vfree(). + * Otherwise kfree() is used. + */ void kvfree(const void *addr) { if (is_vmalloc_addr(addr)) From patchwork Thu Jul 26 12:21:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10545697 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 0590714BC for ; Thu, 26 Jul 2018 12:22:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E91952B118 for ; Thu, 26 Jul 2018 12:22:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD2C02B11F; Thu, 26 Jul 2018 12:22:25 +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 6A4C42B118 for ; Thu, 26 Jul 2018 12:22:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3D3DD6B000D; Thu, 26 Jul 2018 08:22:21 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 306066B000E; Thu, 26 Jul 2018 08:22:21 -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 10B8D6B0010; Thu, 26 Jul 2018 08:22:21 -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 CE5766B000D for ; Thu, 26 Jul 2018 08:22:20 -0400 (EDT) Received: by mail-oi0-f69.google.com with SMTP id c18-v6so1242635oiy.3 for ; Thu, 26 Jul 2018 05:22:20 -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=ubI1RXGG1ZPcJI88EitZOFGyQ0e3sySCTZaYiVqhXgU=; b=QoEjl7GKAM9pY3ZnsCIc4os+9sPTbuHq+jph4Hwaao+OyPLEjJbNhFfIeeXGzj/p2r nQQHqV55S48PXhcxHuTz2YiJyPzPy+hSaK1e78bcDiFXXSlFNK0RbSglDb5WZ+JraAHh oEtEncwbOJtU02o1zBXPV4dmFICJGgVffQdA7ZYp1oWSHudwI3DrNDPTY0Z7paZ4cSDO uVLcJoCaDCJQih+ID9UGClMGr4MEhsFJBobG0D/FTZJ3ph0xEd40ZKnC15o+y3Aj5ozC 8HOD8dyvDEwHxuU21QC+FCetDYneOo2adP+94+7OD84OzVr57wGWlLRYsARK7XsM0Wku 44Ig== 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: AOUpUlFHSD57Qxa85OU2j558WQqM1bOP6T+dJ169XCLVVfKb6qoKVQCL 4qOQn4FLeDMfa11wb1L5KajHklsdIVxWf7CQkOADwlzGkp/4n/7RSeSEb2O1iemJ2p7K26bLyoi CN5hgNVhFIIuZfm+1G7blyfT28e6KXVUBp33JcR70l7hlKtNwGQiqyPsxmNm0nMo= X-Received: by 2002:aca:f58f:: with SMTP id t137-v6mr1840203oih.244.1532607740659; Thu, 26 Jul 2018 05:22:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd8J2zYB0glPjDm9d72g4Hhm9yM2nrCxRWCrRBesMeZBSjz15KxsVHNkzFhBmc1WXEGOa28 X-Received: by 2002:aca:f58f:: with SMTP id t137-v6mr1840160oih.244.1532607739913; Thu, 26 Jul 2018 05:22:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532607739; cv=none; d=google.com; s=arc-20160816; b=O3p6rE6v/s8+0aJVFOmgUhPLk2A3uMBNnWF4KL/gs8i0PLuIsoeLrXKHyxTkbyoJRU bzdlDyUNgI1nTicL6B7qmT5rcPKykbK13wkM1tztZySDToMr0njl/V3xzYmyFyYj2Dnk gyPAOrZ4lUQn4G4uKbCR+9gY5mYUiPLxoyYd14tji9mQ5tQlrSXBCC3APqewuDW4IxGQ vY1KATMZWLdkU//jJuTHZxfthKvn4vxZrhDX4Wpr7ai/YCZ2aYp4nsFg036QhUSF6Y6q gmAE952aE4yzk3Xp5YShDKx/KGsSJEOI10I+Z8dGt6gpn7Xv7DJ5Q9Gux983CKJY0j90 NZvQ== 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=ubI1RXGG1ZPcJI88EitZOFGyQ0e3sySCTZaYiVqhXgU=; b=KkduvnkQq+9kyuZtk8U1w88It/XsmJGuK5L4SU9OvZ77Nkt5zfuYU8PZCS4JXV0po2 Oe0k8zA5/kGCH1qjAVtcuM5/BS2VwvsEkmrDDhiX3hZs/Lz3ivYVyvdIdBksB02yq9u3 Q/F6I2Jkm+DlqWp7O5r5vDd0i/QV1nRcSfoJLo+VvBL0v5f390Ri3jkDE6ef+cg2j+Zv v0rhAHzLuFKiFgQkNgw3aeH+ckG793fBBsJ/4E7CbaRAMsiy4pURiLoM8tbL45UUg0l+ 8ga5Gz7/HOu959GAqwSpOmThxBzEAITh/KCKDai9RYjCPf5fKE0Vn25A5lXeNDdpJNQo g52w== 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 d84-v6si723790oia.219.2018.07.26.05.22.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 05:22:19 -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 (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6QCJ2vJ131267 for ; Thu, 26 Jul 2018 08:22:19 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kfcxkuhda-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Jul 2018 08:22:18 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 26 Jul 2018 13:22:17 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) 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) Thu, 26 Jul 2018 13:22:13 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6QCMCgi41091218 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Jul 2018 12:22:12 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D47B152051; Thu, 26 Jul 2018 15:22:25 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.177]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 5AF445204F; Thu, 26 Jul 2018 15:22:24 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 26 Jul 2018 15:22:10 +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 3/7] docs/core-api: kill trailing whitespace in kernel-api.rst Date: Thu, 26 Jul 2018 15:21:58 +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-0008-0000-0000-000002580C6F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072612-0009-0000-0000-000021BE8B40 Message-Id: <1532607722-17079-4-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=872 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/kernel-api.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/core-api/kernel-api.rst b/Documentation/core-api/kernel-api.rst index 76fe2d0f..25e9496 100644 --- a/Documentation/core-api/kernel-api.rst +++ b/Documentation/core-api/kernel-api.rst @@ -437,4 +437,3 @@ Read-Copy Update (RCU) .. kernel-doc:: include/linux/rcu_sync.h .. kernel-doc:: kernel/rcu/sync.c - From patchwork Thu Jul 26 12:21:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10545699 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 3F8ED14BC for ; Thu, 26 Jul 2018 12:22:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E7082AE5C for ; Thu, 26 Jul 2018 12:22:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 22F762B11C; Thu, 26 Jul 2018 12:22:29 +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 A6C092AE5C for ; Thu, 26 Jul 2018 12:22:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 79C766B000E; Thu, 26 Jul 2018 08:22:23 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 7207F6B0010; Thu, 26 Jul 2018 08:22:23 -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 5094D6B026A; Thu, 26 Jul 2018 08:22:23 -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 13BDD6B000E for ; Thu, 26 Jul 2018 08:22:23 -0400 (EDT) Received: by mail-oi0-f70.google.com with SMTP id x18-v6so1208670oie.7 for ; Thu, 26 Jul 2018 05:22:23 -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=XM+7L2BilOtR0Lf4ViYxHiZv5B/fzeAqge+WEoT92wM=; b=Czrpmswl7BTNWkF/P8BtGvvof4yvxXSD/WL/63kvTiODE3m8DEnMIg+Dd5SlJNkCPU AsSaoptxIjrrPECid8zTNC/5ELSWAmJxw50oQNUTTNhBBuWHVMJMxcxIshv3w4khsjX7 bIIFtzlTgq7Rf5XZ1oFm9vP6y+Vub5pyHLzTYRCdwdfrjsb0qwjyZ/PJLxjZ1zCxWfLQ uwA2Fw9SfBc0QGdcv0DHKsGJGhx94JPDwUx4BLyrwOamjvlfoVttNpLsFI2iJEMsm74Y bNWNE7ycRnKf0HH5efyJLNAAIZLt7oaNop2ZbDTfJlavuFe1c1eshx4+Tlx3bV7gf6ED j7xQ== 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: AOUpUlHDkEdlDbt8Za3+hnupBM2TRbWA/8qB5fm7auEy1OEhGStmnqsG Z37Odi1SV+M2io49n4jRBd0QJ1Fvdcd13zGbrHtsbALavfI0CApe8yFuCmmc3Q7h5A3Ud/AWFrj SIyhooSoDPyT0uuR9Fuv28uVul3WmuVHqy5GLGZKVhuca4+FkbtJ95qnWla50axE= X-Received: by 2002:aca:ecd0:: with SMTP id k199-v6mr1806993oih.227.1532607742869; Thu, 26 Jul 2018 05:22:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdDL5O5RGvVm2F2BbJu/sCXudZ4VPM9llYvRlys/NvhlQfenSMdTlO8wpVvjgZ27Mt/Abq8 X-Received: by 2002:aca:ecd0:: with SMTP id k199-v6mr1806945oih.227.1532607742166; Thu, 26 Jul 2018 05:22:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532607742; cv=none; d=google.com; s=arc-20160816; b=iG8Ys+Kh/bIq9cX3nh3EIolLpyAbPB26pFN9C1LdS2n/uso0o6ZNBPj5P4zW8TeVTX wrOjlUr1yI2bYV+qsR5HLfoawBYxZcwGcEZXCeyyUKoMZ7MuUDxZ03qupJgZkXgyyScX LjcVre57N4jZlOXq/b1SLW03y9S2xzhDn2osB0i3Mwd5liJFgXxAlR6qXn4fmOEj5APp h7qFQ/V8uW+hsNRgS0JVTkUCo47p5s9jm93wEdGQK/QDag9PjtBMZmTG7P07tjmB6rrt ZgcWP77G+G182Ij14SKroai47s9dVi/nb7jmwK1nHFElW9l1FXiB1eQt2PenYYYP1o7/ 3hCg== 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=XM+7L2BilOtR0Lf4ViYxHiZv5B/fzeAqge+WEoT92wM=; b=Hs6/8ra3WqQkmrPQFcI+FsAyzXiKcmQV1VwtJPCxT8pNvhE6jsBB92iJTcbxkIUIzI OSGBvCRO6AsMToREkzkJCfnpLS7ESWwohzuU7rHHQlKh6Tma5T+uDoWiFDITenekt9XM uj/wdLmdXw3KeSawVVEucMLg8KRZrK0y2IX3A1CCIl9THelIlnGVMS3rdzqpab9sVx28 KVKawPd54Dz4us+hfB7aCkWBnEDJod1PGZIkOzR0dsZ48sZVAjRfF/UF9arkYGga1zoc nAIcUVnr7iazwpXJ32Y9vpDHQVoMXnDTWAInWoa7zkayq9qYhd+8Ko3Rh0BSw+JxIZe9 aS2w== 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 j66-v6si780472oif.40.2018.07.26.05.22.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 05:22:22 -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 (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6QCJf4x142386 for ; Thu, 26 Jul 2018 08:22:21 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kfc5vwfak-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Jul 2018 08:22:21 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 26 Jul 2018 13:22:18 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) 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) Thu, 26 Jul 2018 13:22:15 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6QCMEWU23462054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Jul 2018 12:22:14 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0DB264C04A; Thu, 26 Jul 2018 15:22:29 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 86BE74C04E; Thu, 26 Jul 2018 15:22:27 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.177]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 26 Jul 2018 15:22:27 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 26 Jul 2018 15:22:12 +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 4/7] docs/core-api: move *{str,mem}dup* to "String Manipulation" Date: Thu, 26 Jul 2018 15:21:59 +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-0012-0000-0000-0000028F1FAB X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072612-0013-0000-0000-000020C10C71 Message-Id: <1532607722-17079-5-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=916 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 The string and memory duplication routines fit better to the "String Manipulation" section than to "The SLAB Cache". Signed-off-by: Mike Rapoport --- Documentation/core-api/kernel-api.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/core-api/kernel-api.rst b/Documentation/core-api/kernel-api.rst index 25e9496..39f1460 100644 --- a/Documentation/core-api/kernel-api.rst +++ b/Documentation/core-api/kernel-api.rst @@ -39,6 +39,10 @@ String Manipulation .. kernel-doc:: lib/string.c :export: +.. kernel-doc:: mm/util.c + :functions: kstrdup kstrdup_const kstrndup kmemdup kmemdup_nul memdup_user + vmemdup_user strndup_user memdup_user_nul + Basic Kernel Library Functions ============================== @@ -168,7 +172,7 @@ The Slab Cache :export: .. kernel-doc:: mm/util.c - :export: + :functions: kfree_const kvmalloc_node kvfree get_user_pages_fast User Space Memory Access ------------------------ From patchwork Thu Jul 26 12:22:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10545701 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 81E0B112E for ; Thu, 26 Jul 2018 12:22:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 709BD2AE5C for ; Thu, 26 Jul 2018 12:22:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 64CC02B11C; Thu, 26 Jul 2018 12:22: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 D2EC72AE5C for ; Thu, 26 Jul 2018 12:22:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9BE9A6B0010; Thu, 26 Jul 2018 08:22:25 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 901C56B0266; Thu, 26 Jul 2018 08:22:25 -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 6838A6B026A; Thu, 26 Jul 2018 08:22:25 -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 372C16B0266 for ; Thu, 26 Jul 2018 08:22:25 -0400 (EDT) Received: by mail-oi0-f70.google.com with SMTP id s200-v6so1224595oie.6 for ; Thu, 26 Jul 2018 05:22:25 -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=zacj2v+gL+xEawH15lH4idOPm19Lrm+JaASwix2hvhU=; b=sst+/MEkKSVLs/vOUaRfo+L6yKA9FeOhhj3vEeCs3h+Hyuw4o7AGo8j3Bmnb0JV4KC N6bCMy1FIdLOiFP99t8aIBctXcDPx9+u1q0LMT5bw4g+q5gBAqSIHhmcPFlrJehesYMc /usxLAV/tt4KvV1UXx2VN4qGpaHDJh5WXX1h8gDMtzXW9Ic6A4/Lvod4W6qOMBHyXuvO onndhHUiyDZ+TLuXiKxdn3WHyVPpRxtV70hTC6GQD/NMM0QhGE8bJAnyihOqk3/V8/RP gOb/5an5v0rZCCvjkCjMl26Lvpq+2lgr12Q/4IKUhnUxXpHPDJalrUO6gP0vTtvzY09Q 6lig== 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: AOUpUlHHvWu6K5UHnkair6DwHsJ9vovzgmvfe5Id6djwEe0XzWJM7MCf Hyirrmv0VGQCQZ+KbyVuxPg1iwcKbjbljr1ihvJ05GtxQTLNAUKKBezgqSAngqxglsAc/C3VpdF bAgUZStpA9xJr3YDkKIJsERqnh+5Uqg9ed/bptTpGkUJCPjt96W4fmB7noLmvvdI= X-Received: by 2002:aca:c5d8:: with SMTP id v207-v6mr1773270oif.264.1532607744995; Thu, 26 Jul 2018 05:22:24 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd75qNb07P94b3qcbD5IuJD0ReMF/XNNT8eR7Stpn0EWDwmPPlsj17BLspv/7g1XQ/VVSUp X-Received: by 2002:aca:c5d8:: with SMTP id v207-v6mr1773222oif.264.1532607744124; Thu, 26 Jul 2018 05:22:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532607744; cv=none; d=google.com; s=arc-20160816; b=DxM0vq9tAU+3G5YLMpKSid3xB7HQOKtH9AtfJOSYLm0RbGlOkM4+SLi2aNpumCBKxE IqDU8XTuOh/GUoWwV8nYn8sSgjvIVlDPpG7/pcou3AO0KwTlyYaxjEjLf1HDs3x1iaE5 Do5BBNRdDFRpBnj2hYMYgSAPFuuiOxunGhuIs2jIINxW2uuIYby8XaktxIqZJ77yHlRX yv0NNsjpW7fG4gSC5HGfrZk1HPS2NST6+tSlF/zIICCXqhlFbUaxOSTmTsDJK6dY35hT k/6V4miHZVrZhNbZwAaXNKL//airm6IlMazEgxiNuKA1XtAniRV2gtZ8Gkr1Ng0J+VWL Y4kQ== 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=zacj2v+gL+xEawH15lH4idOPm19Lrm+JaASwix2hvhU=; b=kGhUov0pbLood53oJIaLZo0PkRYcjAeto7TQz2V3GAlE6uAR4yb7Kss+67B8UpoL5t onPyXb5fdZABXgrB/84zMn97TxI+wcmsvEyhVinmGzYEt7y4VHOEm+VZQKze7WZqmGCJ oYcVErjhcrirkRGjJ3EFZMOx7CZdgGLifVe3bqKkjdAZ4OAr1fciAivqwFtt+v2BJC25 TmSdM7Q0uI1gb57IUIeKFmIn1VuEeVANxuHJKqO7ZMjvsTkffavZ1F0QXOPiCIUKCXv/ +KO2GOeYfUNkZwOUHfHuOMwrtQCXKNQS+DmWU+ZOIuxFF/c38r6LRYSGCkEoriDOCZ0r unZA== 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 199-v6si806465oic.364.2018.07.26.05.22.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 05:22:24 -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 (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6QCJ4Ru046685 for ; Thu, 26 Jul 2018 08:22:23 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 2kfe0p8q5n-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Jul 2018 08:22:23 -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:21 +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:17 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6QCMG9838600854 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Jul 2018 12:22:16 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 36346A405E; Thu, 26 Jul 2018 15:22:30 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B0707A4040; Thu, 26 Jul 2018 15:22:28 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.177]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 26 Jul 2018 15:22:28 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 26 Jul 2018 15:22:14 +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 5/7] docs/core-api: split memory management API to a separate file Date: Thu, 26 Jul 2018 15:22:00 +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-000002E08D41 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072612-0029-0000-0000-000023987EAD Message-Id: <1532607722-17079-6-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 This is basically copy-paste of the memory management section from kernel-api.rst with some minor adjustments: * The "User Space Memory Access" is moved to the beginning * The get_user_pages_fast reference is now a part of "User Space Memory Access" * And, of course, headings are adjusted with section being promoted to chapters Signed-off-by: Mike Rapoport --- Documentation/core-api/index.rst | 1 + Documentation/core-api/kernel-api.rst | 54 --------------------------------- Documentation/core-api/mm-api.rst | 57 +++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 54 deletions(-) create mode 100644 Documentation/core-api/mm-api.rst diff --git a/Documentation/core-api/index.rst b/Documentation/core-api/index.rst index 989c97c..cdc2020 100644 --- a/Documentation/core-api/index.rst +++ b/Documentation/core-api/index.rst @@ -27,6 +27,7 @@ Core utilities errseq printk-formats circular-buffers + mm-api gfp_mask-from-fs-io timekeeping diff --git a/Documentation/core-api/kernel-api.rst b/Documentation/core-api/kernel-api.rst index 39f1460..3431337 100644 --- a/Documentation/core-api/kernel-api.rst +++ b/Documentation/core-api/kernel-api.rst @@ -159,60 +159,6 @@ UUID/GUID .. kernel-doc:: lib/uuid.c :export: -Memory Management in Linux -========================== - -The Slab Cache --------------- - -.. kernel-doc:: include/linux/slab.h - :internal: - -.. kernel-doc:: mm/slab.c - :export: - -.. kernel-doc:: mm/util.c - :functions: kfree_const kvmalloc_node kvfree get_user_pages_fast - -User Space Memory Access ------------------------- - -.. kernel-doc:: arch/x86/include/asm/uaccess.h - :internal: - -.. kernel-doc:: arch/x86/lib/usercopy_32.c - :export: - -More Memory Management Functions --------------------------------- - -.. kernel-doc:: mm/readahead.c - :export: - -.. kernel-doc:: mm/filemap.c - :export: - -.. kernel-doc:: mm/memory.c - :export: - -.. kernel-doc:: mm/vmalloc.c - :export: - -.. kernel-doc:: mm/page_alloc.c - :internal: - -.. kernel-doc:: mm/mempool.c - :export: - -.. kernel-doc:: mm/dmapool.c - :export: - -.. kernel-doc:: mm/page-writeback.c - :export: - -.. kernel-doc:: mm/truncate.c - :export: - Kernel IPC facilities ===================== diff --git a/Documentation/core-api/mm-api.rst b/Documentation/core-api/mm-api.rst new file mode 100644 index 0000000..b5913aa --- /dev/null +++ b/Documentation/core-api/mm-api.rst @@ -0,0 +1,57 @@ +====================== +Memory Management APIs +====================== + +User Space Memory Access +======================== + +.. kernel-doc:: arch/x86/include/asm/uaccess.h + :internal: + +.. kernel-doc:: arch/x86/lib/usercopy_32.c + :export: + +.. kernel-doc:: mm/util.c + :functions: get_user_pages_fast + +The Slab Cache +============== + +.. kernel-doc:: include/linux/slab.h + :internal: + +.. kernel-doc:: mm/slab.c + :export: + +.. kernel-doc:: mm/util.c + :functions: kfree_const kvmalloc_node kvfree + +More Memory Management Functions +================================ + +.. kernel-doc:: mm/readahead.c + :export: + +.. kernel-doc:: mm/filemap.c + :export: + +.. kernel-doc:: mm/memory.c + :export: + +.. kernel-doc:: mm/vmalloc.c + :export: + +.. kernel-doc:: mm/page_alloc.c + :internal: + +.. kernel-doc:: mm/mempool.c + :export: + +.. kernel-doc:: mm/dmapool.c + :export: + +.. kernel-doc:: mm/page-writeback.c + :export: + +.. kernel-doc:: mm/truncate.c + :export: From patchwork Thu Jul 26 12:22:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10545705 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 816841805 for ; Thu, 26 Jul 2018 12:22:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DE562886E for ; Thu, 26 Jul 2018 12:22:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 605B1288AA; Thu, 26 Jul 2018 12:22:39 +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 0CAA72AE5C for ; Thu, 26 Jul 2018 12:22:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B66F36B026C; Thu, 26 Jul 2018 08:22:32 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B15036B026D; Thu, 26 Jul 2018 08:22:32 -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 9460B6B026E; Thu, 26 Jul 2018 08:22:32 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by kanga.kvack.org (Postfix) with ESMTP id 1CAE06B026D for ; Thu, 26 Jul 2018 08:22:32 -0400 (EDT) Received: by mail-ed1-f72.google.com with SMTP id o60-v6so743904edd.13 for ; Thu, 26 Jul 2018 05:22:32 -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=mntXm4P8E+75SM4+tFlOB3z6exz9sY8VZc6a83C6Dms=; b=UXT8DmHFRnKr0Vtj115xG8B+Y2Zq9wSZTa3SdjCnLPZnqyky71lDez2InL8ZuScV+s 8LTO+qIwIBz4aNk6l1nYwEjTEgQ+fRHZY/8VaQY0i1XNcFI6OpNmw88v++e/sdqrNFsi A1egRfWsLVqfdg3W5zkX3yP5GBQhF7Gx1E4MLzjNu49JDT6V+iElSbSqrni0Xd9exrFO mM3IInJ7PyeweJHNiDZHTW4jweRNHi5yg5QqOWSSWhpEKm9NcEbpnmaCqvV//fH3sqpY s6QOfhnA6cL9mcwT/x3PC75kNztmR9aE/w5zPJcS6Ln9/HxNgsrMsrSZqH/K9cnu6fEW yasw== 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: AOUpUlEroW3oVCZD5iRQSh59eYLD2JAFcOwwvdK6pv4ZfcArCYEr7+sI D8LBKYMK+jK5GnngOO/3d2xYHseKP/1K8692M93O9No37PohfeWRitaX3kauUJTKrT0y+Z3pPt0 oW87o5WelfE3fSKE/LdN1GRPhXFqqcy/d55SNuyYo+FNW3xR/9YtQADbsYkUtQms= X-Received: by 2002:a50:afa3:: with SMTP id h32-v6mr2500259edd.129.1532607751642; Thu, 26 Jul 2018 05:22:31 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfh9cx0YIxEqHmeECXUUmHP/kdvpKQDPHU4OwvSWNF2f3QYsd6QnITVkp7t5RWEtAm2eFXH X-Received: by 2002:a50:afa3:: with SMTP id h32-v6mr2500169edd.129.1532607750125; Thu, 26 Jul 2018 05:22:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532607750; cv=none; d=google.com; s=arc-20160816; b=gfGXMKMFqDAARrB3prdrn76jAw2vHEYeVDlotR0c9zN6q3wu6xqqw7VWDHZLShBHsu MCAtsOthizEBqEsbO5EnSbnAXtSxZLpjtWxm8+UEOa1KbdG90K8rox5Hiw2CP1Sx89gW vyy0vxmm4tTkUCMo8RklkQGqeWw6C3gsZnW6PwTUV/zrH88ifZgv+yPpg5NsY1CLTkfa KN+UAkuozldtf4QoBcsWfCcP5mH1TKLv/gZNQetTDQ5XSAZZ60cdjDjEwLU/gRNNpzAp 9n92O3qlTbk9+yw4wmfwbj23BKjniwy5fbNaldksI6GQ8iybG058eaBz8JpgjHUWtbUZ wnlA== 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=mntXm4P8E+75SM4+tFlOB3z6exz9sY8VZc6a83C6Dms=; b=oJeJXX92+qL5pLojtT2sCprLfqoj0/cW3C5xSanHlSTpIs44Rabex+W/YQ7jbxqqFj VOgv74ar7eO0UU7RlmZBAnIbgJoZeiQlBjPKkBk3Oxndy0404fjwR5jvd4gXbNvnKe0C I8Xjq9fqltrthOYFCSpCEtUcW1GGrF7Zpo1ws3RCS999TVvJGl3qJ8ZMiDhhzAqUd6PK KunY9gdGZXIe4e0S3nzUi8nNsMf/JOeCsitVemd5OOO6IqR3HfOw3t7qQlBAD9Fbj9Bw qq+Bpcdou5L37cQg5h3ZIlEGsqjvtgTGPD0PwOm/m+J5NOcGQMIdorrKwa0g3EuNvtcy Ntkw== 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 z9-v6si1395531edm.201.2018.07.26.05.22.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 05:22:30 -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 (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6QCKpon014008 for ; Thu, 26 Jul 2018 08:22:26 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 2kfe7nr2bg-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Jul 2018 08:22:25 -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:23 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) 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:19 +0100 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6QCMIq926411120 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Jul 2018 12:22:18 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 33F6B42042; Thu, 26 Jul 2018 15:22:33 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AE20842045; Thu, 26 Jul 2018 15:22:31 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.177]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 26 Jul 2018 15:22:31 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 26 Jul 2018 15:22:16 +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 6/7] docs/mm: make GFP flags descriptions usable as kernel-doc Date: Thu, 26 Jul 2018 15:22:01 +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-000002E08D43 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072612-0029-0000-0000-000023987EB0 Message-Id: <1532607722-17079-7-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=2 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 This patch adds DOC: headings for GFP flag descriptions and adjusts the formatting to fit sphinx expectations of paragraphs. Signed-off-by: Mike Rapoport --- include/linux/gfp.h | 291 +++++++++++++++++++++++++++------------------------- 1 file changed, 154 insertions(+), 137 deletions(-) diff --git a/include/linux/gfp.h b/include/linux/gfp.h index a6afcec..50c1d85 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -59,29 +59,32 @@ struct vm_area_struct; #define __GFP_MOVABLE ((__force gfp_t)___GFP_MOVABLE) /* ZONE_MOVABLE allowed */ #define GFP_ZONEMASK (__GFP_DMA|__GFP_HIGHMEM|__GFP_DMA32|__GFP_MOVABLE) -/* +/** + * DOC: Page mobility and placement hints + * * Page mobility and placement hints + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * * These flags provide hints about how mobile the page is. Pages with similar * mobility are placed within the same pageblocks to minimise problems due * to external fragmentation. * - * __GFP_MOVABLE (also a zone modifier) indicates that the page can be - * moved by page migration during memory compaction or can be reclaimed. + * %__GFP_MOVABLE (also a zone modifier) indicates that the page can be + * moved by page migration during memory compaction or can be reclaimed. * - * __GFP_RECLAIMABLE is used for slab allocations that specify - * SLAB_RECLAIM_ACCOUNT and whose pages can be freed via shrinkers. + * %__GFP_RECLAIMABLE is used for slab allocations that specify + * SLAB_RECLAIM_ACCOUNT and whose pages can be freed via shrinkers. * - * __GFP_WRITE indicates the caller intends to dirty the page. Where possible, - * these pages will be spread between local zones to avoid all the dirty - * pages being in one zone (fair zone allocation policy). + * %__GFP_WRITE indicates the caller intends to dirty the page. Where possible, + * these pages will be spread between local zones to avoid all the dirty + * pages being in one zone (fair zone allocation policy). * - * __GFP_HARDWALL enforces the cpuset memory allocation policy. + * %__GFP_HARDWALL enforces the cpuset memory allocation policy. * - * __GFP_THISNODE forces the allocation to be satisified from the requested - * node with no fallbacks or placement policy enforcements. + * %__GFP_THISNODE forces the allocation to be satisified from the requested + * node with no fallbacks or placement policy enforcements. * - * __GFP_ACCOUNT causes the allocation to be accounted to kmemcg. + * %__GFP_ACCOUNT causes the allocation to be accounted to kmemcg. */ #define __GFP_RECLAIMABLE ((__force gfp_t)___GFP_RECLAIMABLE) #define __GFP_WRITE ((__force gfp_t)___GFP_WRITE) @@ -89,54 +92,60 @@ struct vm_area_struct; #define __GFP_THISNODE ((__force gfp_t)___GFP_THISNODE) #define __GFP_ACCOUNT ((__force gfp_t)___GFP_ACCOUNT) -/* +/** + * DOC: Watermark modifiers + * * Watermark modifiers -- controls access to emergency reserves + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * - * __GFP_HIGH indicates that the caller is high-priority and that granting - * the request is necessary before the system can make forward progress. - * For example, creating an IO context to clean pages. + * %__GFP_HIGH indicates that the caller is high-priority and that granting + * the request is necessary before the system can make forward progress. + * For example, creating an IO context to clean pages. * - * __GFP_ATOMIC indicates that the caller cannot reclaim or sleep and is - * high priority. Users are typically interrupt handlers. This may be - * used in conjunction with __GFP_HIGH + * %__GFP_ATOMIC indicates that the caller cannot reclaim or sleep and is + * high priority. Users are typically interrupt handlers. This may be + * used in conjunction with %__GFP_HIGH * - * __GFP_MEMALLOC allows access to all memory. This should only be used when - * the caller guarantees the allocation will allow more memory to be freed - * very shortly e.g. process exiting or swapping. Users either should - * be the MM or co-ordinating closely with the VM (e.g. swap over NFS). + * %__GFP_MEMALLOC allows access to all memory. This should only be used when + * the caller guarantees the allocation will allow more memory to be freed + * very shortly e.g. process exiting or swapping. Users either should + * be the MM or co-ordinating closely with the VM (e.g. swap over NFS). * - * __GFP_NOMEMALLOC is used to explicitly forbid access to emergency reserves. - * This takes precedence over the __GFP_MEMALLOC flag if both are set. + * %__GFP_NOMEMALLOC is used to explicitly forbid access to emergency reserves. + * This takes precedence over the %__GFP_MEMALLOC flag if both are set. */ #define __GFP_ATOMIC ((__force gfp_t)___GFP_ATOMIC) #define __GFP_HIGH ((__force gfp_t)___GFP_HIGH) #define __GFP_MEMALLOC ((__force gfp_t)___GFP_MEMALLOC) #define __GFP_NOMEMALLOC ((__force gfp_t)___GFP_NOMEMALLOC) -/* +/** + * DOC: Reclaim modifiers + * * Reclaim modifiers + * ~~~~~~~~~~~~~~~~~ * - * __GFP_IO can start physical IO. + * %__GFP_IO can start physical IO. * - * __GFP_FS can call down to the low-level FS. Clearing the flag avoids the - * allocator recursing into the filesystem which might already be holding - * locks. + * %__GFP_FS can call down to the low-level FS. Clearing the flag avoids the + * allocator recursing into the filesystem which might already be holding + * locks. * - * __GFP_DIRECT_RECLAIM indicates that the caller may enter direct reclaim. - * This flag can be cleared to avoid unnecessary delays when a fallback - * option is available. + * %__GFP_DIRECT_RECLAIM indicates that the caller may enter direct reclaim. + * This flag can be cleared to avoid unnecessary delays when a fallback + * option is available. * - * __GFP_KSWAPD_RECLAIM indicates that the caller wants to wake kswapd when - * the low watermark is reached and have it reclaim pages until the high - * watermark is reached. A caller may wish to clear this flag when fallback - * options are available and the reclaim is likely to disrupt the system. The - * canonical example is THP allocation where a fallback is cheap but - * reclaim/compaction may cause indirect stalls. + * %__GFP_KSWAPD_RECLAIM indicates that the caller wants to wake kswapd when + * the low watermark is reached and have it reclaim pages until the high + * watermark is reached. A caller may wish to clear this flag when fallback + * options are available and the reclaim is likely to disrupt the system. The + * canonical example is THP allocation where a fallback is cheap but + * reclaim/compaction may cause indirect stalls. * - * __GFP_RECLAIM is shorthand to allow/forbid both direct and kswapd reclaim. + * %__GFP_RECLAIM is shorthand to allow/forbid both direct and kswapd reclaim. * * The default allocator behavior depends on the request size. We have a concept - * of so called costly allocations (with order > PAGE_ALLOC_COSTLY_ORDER). + * of so called costly allocations (with order > %PAGE_ALLOC_COSTLY_ORDER). * !costly allocations are too essential to fail so they are implicitly * non-failing by default (with some exceptions like OOM victims might fail so * the caller still has to check for failures) while costly requests try to be @@ -144,40 +153,40 @@ struct vm_area_struct; * The following three modifiers might be used to override some of these * implicit rules * - * __GFP_NORETRY: The VM implementation will try only very lightweight - * memory direct reclaim to get some memory under memory pressure (thus - * it can sleep). It will avoid disruptive actions like OOM killer. The - * caller must handle the failure which is quite likely to happen under - * heavy memory pressure. The flag is suitable when failure can easily be - * handled at small cost, such as reduced throughput - * - * __GFP_RETRY_MAYFAIL: The VM implementation will retry memory reclaim - * procedures that have previously failed if there is some indication - * that progress has been made else where. It can wait for other - * tasks to attempt high level approaches to freeing memory such as - * compaction (which removes fragmentation) and page-out. - * There is still a definite limit to the number of retries, but it is - * a larger limit than with __GFP_NORETRY. - * Allocations with this flag may fail, but only when there is - * genuinely little unused memory. While these allocations do not - * directly trigger the OOM killer, their failure indicates that - * the system is likely to need to use the OOM killer soon. The - * caller must handle failure, but can reasonably do so by failing - * a higher-level request, or completing it only in a much less - * efficient manner. - * If the allocation does fail, and the caller is in a position to - * free some non-essential memory, doing so could benefit the system - * as a whole. - * - * __GFP_NOFAIL: The VM implementation _must_ retry infinitely: the caller - * cannot handle allocation failures. The allocation could block - * indefinitely but will never return with failure. Testing for - * failure is pointless. - * New users should be evaluated carefully (and the flag should be - * used only when there is no reasonable failure policy) but it is - * definitely preferable to use the flag rather than opencode endless - * loop around allocator. - * Using this flag for costly allocations is _highly_ discouraged. + * %__GFP_NORETRY: The VM implementation will try only very lightweight + * memory direct reclaim to get some memory under memory pressure (thus + * it can sleep). It will avoid disruptive actions like OOM killer. The + * caller must handle the failure which is quite likely to happen under + * heavy memory pressure. The flag is suitable when failure can easily be + * handled at small cost, such as reduced throughput + * + * %__GFP_RETRY_MAYFAIL: The VM implementation will retry memory reclaim + * procedures that have previously failed if there is some indication + * that progress has been made else where. It can wait for other + * tasks to attempt high level approaches to freeing memory such as + * compaction (which removes fragmentation) and page-out. + * There is still a definite limit to the number of retries, but it is + * a larger limit than with %__GFP_NORETRY. + * Allocations with this flag may fail, but only when there is + * genuinely little unused memory. While these allocations do not + * directly trigger the OOM killer, their failure indicates that + * the system is likely to need to use the OOM killer soon. The + * caller must handle failure, but can reasonably do so by failing + * a higher-level request, or completing it only in a much less + * efficient manner. + * If the allocation does fail, and the caller is in a position to + * free some non-essential memory, doing so could benefit the system + * as a whole. + * + * %__GFP_NOFAIL: The VM implementation _must_ retry infinitely: the caller + * cannot handle allocation failures. The allocation could block + * indefinitely but will never return with failure. Testing for + * failure is pointless. + * New users should be evaluated carefully (and the flag should be + * used only when there is no reasonable failure policy) but it is + * definitely preferable to use the flag rather than opencode endless + * loop around allocator. + * Using this flag for costly allocations is _highly_ discouraged. */ #define __GFP_IO ((__force gfp_t)___GFP_IO) #define __GFP_FS ((__force gfp_t)___GFP_FS) @@ -188,14 +197,17 @@ struct vm_area_struct; #define __GFP_NOFAIL ((__force gfp_t)___GFP_NOFAIL) #define __GFP_NORETRY ((__force gfp_t)___GFP_NORETRY) -/* +/** + * DOC: Action modifiers + * * Action modifiers + * ~~~~~~~~~~~~~~~~ * - * __GFP_NOWARN suppresses allocation failure reports. + * %__GFP_NOWARN suppresses allocation failure reports. * - * __GFP_COMP address compound page metadata. + * %__GFP_COMP address compound page metadata. * - * __GFP_ZERO returns a zeroed page on success. + * %__GFP_ZERO returns a zeroed page on success. */ #define __GFP_NOWARN ((__force gfp_t)___GFP_NOWARN) #define __GFP_COMP ((__force gfp_t)___GFP_COMP) @@ -208,66 +220,71 @@ struct vm_area_struct; #define __GFP_BITS_SHIFT (23 + IS_ENABLED(CONFIG_LOCKDEP)) #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) -/* +/** + * DOC: Common combinations + * + * Common combinations + * ~~~~~~~~~~~~~~~~~~~ + * * Useful GFP flag combinations that are commonly used. It is recommended * that subsystems start with one of these combinations and then set/clear - * __GFP_FOO flags as necessary. - * - * GFP_ATOMIC users can not sleep and need the allocation to succeed. A lower - * watermark is applied to allow access to "atomic reserves" - * - * GFP_KERNEL is typical for kernel-internal allocations. The caller requires - * ZONE_NORMAL or a lower zone for direct access but can direct reclaim. - * - * GFP_KERNEL_ACCOUNT is the same as GFP_KERNEL, except the allocation is - * accounted to kmemcg. - * - * GFP_NOWAIT is for kernel allocations that should not stall for direct - * reclaim, start physical IO or use any filesystem callback. - * - * GFP_NOIO will use direct reclaim to discard clean pages or slab pages - * that do not require the starting of any physical IO. - * Please try to avoid using this flag directly and instead use - * memalloc_noio_{save,restore} to mark the whole scope which cannot - * perform any IO with a short explanation why. All allocation requests - * will inherit GFP_NOIO implicitly. - * - * GFP_NOFS will use direct reclaim but will not use any filesystem interfaces. - * Please try to avoid using this flag directly and instead use - * memalloc_nofs_{save,restore} to mark the whole scope which cannot/shouldn't - * recurse into the FS layer with a short explanation why. All allocation - * requests will inherit GFP_NOFS implicitly. - * - * GFP_USER is for userspace allocations that also need to be directly - * accessibly by the kernel or hardware. It is typically used by hardware - * for buffers that are mapped to userspace (e.g. graphics) that hardware - * still must DMA to. cpuset limits are enforced for these allocations. - * - * GFP_DMA exists for historical reasons and should be avoided where possible. - * The flags indicates that the caller requires that the lowest zone be - * used (ZONE_DMA or 16M on x86-64). Ideally, this would be removed but - * it would require careful auditing as some users really require it and - * others use the flag to avoid lowmem reserves in ZONE_DMA and treat the - * lowest zone as a type of emergency reserve. - * - * GFP_DMA32 is similar to GFP_DMA except that the caller requires a 32-bit - * address. - * - * GFP_HIGHUSER is for userspace allocations that may be mapped to userspace, - * do not need to be directly accessible by the kernel but that cannot - * move once in use. An example may be a hardware allocation that maps - * data directly into userspace but has no addressing limitations. - * - * GFP_HIGHUSER_MOVABLE is for userspace allocations that the kernel does not - * need direct access to but can use kmap() when access is required. They - * are expected to be movable via page reclaim or page migration. Typically, - * pages on the LRU would also be allocated with GFP_HIGHUSER_MOVABLE. - * - * GFP_TRANSHUGE and GFP_TRANSHUGE_LIGHT are used for THP allocations. They are - * compound allocations that will generally fail quickly if memory is not - * available and will not wake kswapd/kcompactd on failure. The _LIGHT - * version does not attempt reclaim/compaction at all and is by default used - * in page fault path, while the non-light is used by khugepaged. + * %__GFP_FOO flags as necessary. + * + * %GFP_ATOMIC users can not sleep and need the allocation to succeed. A lower + * watermark is applied to allow access to "atomic reserves" + * + * %GFP_KERNEL is typical for kernel-internal allocations. The caller requires + * %ZONE_NORMAL or a lower zone for direct access but can direct reclaim. + * + * %GFP_KERNEL_ACCOUNT is the same as GFP_KERNEL, except the allocation is + * accounted to kmemcg. + * + * %GFP_NOWAIT is for kernel allocations that should not stall for direct + * reclaim, start physical IO or use any filesystem callback. + * + * %GFP_NOIO will use direct reclaim to discard clean pages or slab pages + * that do not require the starting of any physical IO. + * Please try to avoid using this flag directly and instead use + * memalloc_noio_{save,restore} to mark the whole scope which cannot + * perform any IO with a short explanation why. All allocation requests + * will inherit GFP_NOIO implicitly. + * + * %GFP_NOFS will use direct reclaim but will not use any filesystem interfaces. + * Please try to avoid using this flag directly and instead use + * memalloc_nofs_{save,restore} to mark the whole scope which cannot/shouldn't + * recurse into the FS layer with a short explanation why. All allocation + * requests will inherit GFP_NOFS implicitly. + * + * %GFP_USER is for userspace allocations that also need to be directly + * accessibly by the kernel or hardware. It is typically used by hardware + * for buffers that are mapped to userspace (e.g. graphics) that hardware + * still must DMA to. cpuset limits are enforced for these allocations. + * + * %GFP_DMA exists for historical reasons and should be avoided where possible. + * The flags indicates that the caller requires that the lowest zone be + * used (%ZONE_DMA or 16M on x86-64). Ideally, this would be removed but + * it would require careful auditing as some users really require it and + * others use the flag to avoid lowmem reserves in %ZONE_DMA and treat the + * lowest zone as a type of emergency reserve. + * + * %GFP_DMA32 is similar to %GFP_DMA except that the caller requires a 32-bit + * address. + * + * %GFP_HIGHUSER is for userspace allocations that may be mapped to userspace, + * do not need to be directly accessible by the kernel but that cannot + * move once in use. An example may be a hardware allocation that maps + * data directly into userspace but has no addressing limitations. + * + * %GFP_HIGHUSER_MOVABLE is for userspace allocations that the kernel does not + * need direct access to but can use kmap() when access is required. They + * are expected to be movable via page reclaim or page migration. Typically, + * pages on the LRU would also be allocated with %GFP_HIGHUSER_MOVABLE. + * + * %GFP_TRANSHUGE and %GFP_TRANSHUGE_LIGHT are used for THP allocations. They + * are compound allocations that will generally fail quickly if memory is not + * available and will not wake kswapd/kcompactd on failure. The _LIGHT + * version does not attempt reclaim/compaction at all and is by default used + * in page fault path, while the non-light is used by khugepaged. */ #define GFP_ATOMIC (__GFP_HIGH|__GFP_ATOMIC|__GFP_KSWAPD_RECLAIM) #define GFP_KERNEL (__GFP_RECLAIM | __GFP_IO | __GFP_FS) 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 ==============