From patchwork Thu Jul 26 17:32:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10546271 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 85424112B for ; Thu, 26 Jul 2018 17:32:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 767052B073 for ; Thu, 26 Jul 2018 17:32:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A4502B645; Thu, 26 Jul 2018 17:32:58 +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 12B902B073 for ; Thu, 26 Jul 2018 17:32:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E02CB6B0266; Thu, 26 Jul 2018 13:32:56 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id DB1F96B026A; Thu, 26 Jul 2018 13:32:56 -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 C78946B026B; Thu, 26 Jul 2018 13:32:56 -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 A0C8B6B0266 for ; Thu, 26 Jul 2018 13:32:56 -0400 (EDT) Received: by mail-oi0-f69.google.com with SMTP id e23-v6so1917908oii.10 for ; Thu, 26 Jul 2018 10:32:56 -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=i4lyXpE6Xvc1Lwckey+FpINJPin08Tx5Cbjah+vIt++BecKPJDF1dRHf3X512H9FMb fQhC5TUk/GLZpsBP9956YidAm6FyxQio5nphqgwmskdob16bNc90dBOGm4heLsD8tEfq CGyX6Hgy+W9IoRYMBC0aLT1PzMhE1g5TRwzOOjAOQB0zGNbgScnwz1Eq6G0JPhVyQOzr xKWXOSqk9nigRCLnvRzRaVUYqT0SwakoPCvwqDQur5Bp3wg4EOd95rBsKs3zJehsZz8Z OI8sDFcUgmRgsMDNA0N5QXXjWTpL86DKmKIz5vZWFhRZAtM+cmrhN+m2B5YJfeoMzvL3 DF0A== 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: AOUpUlE0z5UtIBcQg6j8eOjPAbP4Cgqw0rGV4OhS9eCUZdlEwNkZlkB9 DUL1XuMC6/dwdMc+e2XYAiC1mQek3f7QuykNB7ndLO6fBjWgZCmJ9Sco4GqkbH/oefBZ19AjN9T Y7II2t1Hmb5ABWmV25CeuEqaLu5+YYdqIjTBxuIVI5Bpdbxg+KICChkNSQLyPxL8= X-Received: by 2002:aca:4c7:: with SMTP id 190-v6mr3036194oie.107.1532626376426; Thu, 26 Jul 2018 10:32:56 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd4tzGlx5eEv1vRYZYDdV+YK5jtXFxYeiEYGMT/4f6vW2BzSdUHmnueyxCTGSmk4cxUZX4t X-Received: by 2002:aca:4c7:: with SMTP id 190-v6mr3036160oie.107.1532626375854; Thu, 26 Jul 2018 10:32:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532626375; cv=none; d=google.com; s=arc-20160816; b=V8egAbhraA9c209cQK13GBuPsvp2wTB+U/sxIStutEzc7w22u/Z7KDuU5cTaHF+gRw cb6IhFbZJaWzRtvdmmmhhgJ448jkZseCGzN3kKJ2DrhA3nJs+DIcYNAfFp8ZrL7h/MXU oo9XMpHR55QyiesUyR1yTRdKvthvWZQ0o66uROKNQSM/TgCFIx5Derw/adIIUhProlOo YyVb458Hd7+p5KeTrA1/L4q36KoxZVJz7kbFx760lly2C5kY/++IMNxtOt262NNgfGtK iVsFEDgJys6sVbyHWDa34twNLR7Z+DrA/suhGYfIX4FkYcnVeuaiqDy2Cf7Urgq2PnrH nyAQ== 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=lLARlGkh1FrFW8YTn313bvUiXQQZAlquzdE/gkZC0RbfMnBLah4wvlBTkM0gNdzJ3+ QdPNlAe1w2sswimzatT1a6Y/7wkjvEIqvCTaj55vwEq4A7q6uShO9RPq0DOqF1WGEUnV 1ldztfxSZxyqJR+lh1u5ffyi7XZxh57XemNts+8oAQ19qoMwsxCitgizO7SLjpfP1Frs DpZ7evuFaQ2TN1qdBLEDip8oaPb4VmTEStTl48baKiAs42jeIxDk859cLONwI0k0S+Rv AE6awlZKGsYaLPr5aCbEJrLQoAn3HqqyQnazYhsQTO4zjv+kQoIK3+CDZvFsT5cEOhdK K9Hw== 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 c83-v6si1152484oia.350.2018.07.26.10.32.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 10:32:55 -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 (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6QHTfBP032665 for ; Thu, 26 Jul 2018 13:32:55 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kfgduq1d4-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Jul 2018 13:32:54 -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 18:32:51 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 26 Jul 2018 18:32:47 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6QHWk1646268486 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Jul 2018 17:32:46 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 17752A4053; Thu, 26 Jul 2018 20:33:00 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 42801A4051; Thu, 26 Jul 2018 20:32:58 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.204.214]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 26 Jul 2018 20:32:58 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 26 Jul 2018 20:32:43 +0300 From: Mike Rapoport To: Jonathan Corbet , Andrew Morton Cc: Matthew Wilcox , Michal Hocko , linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: [PATCH v3 1/7] mm/util: make strndup_user description a kernel-doc comment Date: Thu, 26 Jul 2018 20:32:34 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532626360-16650-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1532626360-16650-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18072617-0012-0000-0000-0000028F3F09 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072617-0013-0000-0000-000020C12DEA Message-Id: <1532626360-16650-2-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-26_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=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-1807260180 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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 17:32: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: 10546273 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 17BA7174A for ; Thu, 26 Jul 2018 17:33:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 091B02AB8B for ; Thu, 26 Jul 2018 17:33:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F10D42B073; Thu, 26 Jul 2018 17:33:01 +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 94F1F2AB8B for ; Thu, 26 Jul 2018 17:33:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 639786B026B; Thu, 26 Jul 2018 13:33:00 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 60FA16B026D; Thu, 26 Jul 2018 13:33:00 -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 52F486B026E; Thu, 26 Jul 2018 13:33:00 -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 EA8DC6B026B for ; Thu, 26 Jul 2018 13:32:59 -0400 (EDT) Received: by mail-ed1-f72.google.com with SMTP id o60-v6so1130104edd.13 for ; Thu, 26 Jul 2018 10:32:59 -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=tGu1eY9qygRkdkextWSSB0/0t8TH4vKXQugwwrC+5MxhirHnSfd1KQAWuTOhf1JCPs g40hoxxAqnIgzPFXOl5VjLk0Wj7Lwvl0YykfgFAh1W+/XdUOhu3gTNYqkrY5RmKpKD0a C0ns8XWSUEDWWjgN6MHFNZnnn6/8qvloGkgGbn7YYOEPY6vyQBw/PzJyFM0GDqmH9yTE wm87t2+ZyIInxChSiD2/g28Dw5UJrD747LB6Nsy0nWxTPvKdHnS+OaYmmf5AKgJjv5B/ ta6c+MKOZsw+XHjmx7J0ca/C43SLI1k0D4Vb2DUOPgQQ9MJxZ6xU+L1581iP93+Gt53t DTQA== 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: AOUpUlFTb8gBMBFlaswrHR1jgbe1C1RDO+xAcS9F2N0PnQP7Os+SAOT0 roUF+DHXJT0Qt3Krbv8uHe8ivURAB71rOZ595Zao7BiS0R8I093e/NdzUfwYZY6lhJ/8m6dqPUT bJZeA0tHJJJ8mHQiIlXifTVAznMZRQ/aSFSU82Y3lKlYvxkiqwhdDZ2XKkuR1QoE= X-Received: by 2002:aa7:c88f:: with SMTP id p15-v6mr3744218eds.242.1532626379526; Thu, 26 Jul 2018 10:32:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdUTqJkq9P1boMKD/bMuPE+sQOStJP6Zp9INwie2XJNznvZ3YWE2OEuo7Tf7H0mroOjTDiF X-Received: by 2002:aa7:c88f:: with SMTP id p15-v6mr3744185eds.242.1532626378967; Thu, 26 Jul 2018 10:32:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532626378; cv=none; d=google.com; s=arc-20160816; b=wMVuoASLV0Mhest2tl9peNC52ghcUGuA5UmSP4BgozTpUOUu9g2FB4MtFUbNUfpEAd DywGDcRMTsLXGggcU3Xq8WFK37p+3K8Lj0b/JalxST+4qMtjlz/uwWlXrZ2rnK36HZ4M mwOjWaWJFyHFkR8ob4Ky9xv7JUkh4d9/4cedCIloDa0kjlaTj6Nt51rS3/AvEr9YvHaq E6s/4f/NHFGj/Z9u5tnVZKaUMvDkwvvfW9SZOIdoVRQodCSPev9ITl0nolBsxAwzHXS7 /LxHbVAu1wt++XMA7hfxWIwFyZKkSYlhULKm5a4N8i/s0sPTN+S8XPY+f7l78zJCDfiB +qvw== 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=YxrwNIqaMNSK+Qk3+EUpmlmqLEq35wlUqaAzIECpj+twsB+B/vxeQj2aJCgBVMTrCi xM5K+515KwYsxEQ2I669so3kdV7T0Cuqo5JdKveWGi70a5Lt+k6jIe+LAjYSkYvQHmgO AgsrZi/w8IuUgsST1I2VdkeKmK6fUErtpjTy2Ry5ryF8FvFqT3bICOaJVCdhF9w5buaJ MsQYmQtD/jgjrqXSbiT4DbYltfmATFF3bjRqavMqzpNghh/l2lLEV4E3/5vtnN5/Yme7 Z1+cacHPgeUd7X9T5VdAay2jiMinCGu+QdkER2U0nAvSkxQwD/RGgreEedOM4op41rG9 QEbA== 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 7-v6si1849011edv.293.2018.07.26.10.32.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 10:32:58 -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 w6QHSqnm113721 for ; Thu, 26 Jul 2018 13:32:57 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kfg297uu2-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Jul 2018 13:32:57 -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 18:32:53 +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 18:32:50 +0100 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6QHWneA39059658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Jul 2018 17:32:49 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A8BBB42045; Thu, 26 Jul 2018 20:33:03 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C450F42049; Thu, 26 Jul 2018 20:33:01 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.204.214]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 26 Jul 2018 20:33:01 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 26 Jul 2018 20:32:46 +0300 From: Mike Rapoport To: Jonathan Corbet , Andrew Morton Cc: Matthew Wilcox , Michal Hocko , linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: [PATCH v3 2/7] mm/util: add kernel-doc for kvfree Date: Thu, 26 Jul 2018 20:32:35 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532626360-16650-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1532626360-16650-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18072617-0028-0000-0000-000002E0AD27 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072617-0029-0000-0000-00002398A0A9 Message-Id: <1532626360-16650-3-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-26_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=828 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807260180 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Mike Rapoport --- 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 17:32:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10546275 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 A9AC0174A for ; Thu, 26 Jul 2018 17:33:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9845F2AB8B for ; Thu, 26 Jul 2018 17:33:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A09D2B073; Thu, 26 Jul 2018 17:33:04 +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 15A9C2AB8B for ; Thu, 26 Jul 2018 17:33:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 550FA6B026C; Thu, 26 Jul 2018 13:33:01 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 4D75D6B026D; Thu, 26 Jul 2018 13:33:01 -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 3764A6B026E; Thu, 26 Jul 2018 13:33:01 -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 CC7AC6B026C for ; Thu, 26 Jul 2018 13:33:00 -0400 (EDT) Received: by mail-ed1-f72.google.com with SMTP id g11-v6so1088982edi.8 for ; Thu, 26 Jul 2018 10:33:00 -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=tq4X5tIiTtUR/HnHVBAhZIvTtct3Ai+6jMyDK8BMjYURtWN/sRQCIYvs9Rdsj6tEJ+ UFrd4tptEpSlKY2xoIEpZHRm33asgTABZEjqlXqwfBAvDyYF4OydDxd+0YhnfEwFlA6C bhfI9V36rHh1Kkby1zLOHeZ0tYcdlD0sh8yuw+YcCquXbicO3Pg31uTBXP++jcPhihHW I5NrmM5zpRgeTJi1NcfbN99nCSHhdmZ/6MK6QVHheiRAa+JOqBI7xxEPR2njYcxAV1kY EjpolA9Wt0A+VfWpgKsePIlM54ta4Xka+z6N22dNCB0g67UDKg99cbtgTUNgRacaTbtp NXQA== 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: AOUpUlFJThhaFhOFhg7HoW5EzbKvg3UjMgHA2pjDKpYTbR8sR91d6+M7 ToQJ8W2YSJYQ1JAF0W38XkFjsnAxFQCM7Gf2ys88FRBTU22L/KnL4tNW+VEO44rA0Rqwbp/dKMy FuPpc7owIrDvKEmhKcG+MjwcO8AXLQPpf7Nzn6mE4cVGZfgLhZD3RiYMAEQkxgD0= X-Received: by 2002:a50:c3c7:: with SMTP id i7-v6mr3767698edf.232.1532626380372; Thu, 26 Jul 2018 10:33:00 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfa+OxYpV4MAo2skLFJHDNNMCd+TdVX2DVQUS16uY5LSDhJev9fkvy9gALd8JF0or3/JTAN X-Received: by 2002:a50:c3c7:: with SMTP id i7-v6mr3767667edf.232.1532626379828; Thu, 26 Jul 2018 10:32:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532626379; cv=none; d=google.com; s=arc-20160816; b=a9aKFCSCP4gKUYNx/7xPD+l9VD3nmo2aTaICMLp81rZdTuPD9hkb7VbCSZdhuQte+U 61phYnJpQerkz61gvdtHe+5rkcx8ZBBDqWF9gUxTym70YbytYdLHZ/wE+xYN8EQpIuBI GMgXjQUyOFAa/q1tOQARC6Qm1dHvH/K0oLANNRO2E1oJUmRR8JDA674PTLG3P3xubFjW mxSfzSpCjeMGReP51Ir3PvmZhOksy4gDlpauNF+bh2atKw0nvtiUtG5m9+UjJSauzdc5 V19b4YiSrUNwmBSVUui8vmIJVF303eUfZBx836tSgOKPkA9s4n4s58/EDDz2tTdWHUVE IkwQ== 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=vySNSZ5jDhk8pxkv+97GtUo5hjHUSZ1WoP6+gVPzhwxU2CMogN4qhbFl/y72qC2a61 b2YZ3FvWazUsqKvhX5wLtIz6pjA0f9/A0L8NnMPmmZGEc4ZiQ70D0/yeNGsrdE6VgHf4 4ZgSoUG1MlIZcDXjj0dKp2JuiRmXiLaquPrGyR0KPqInD+pQusFPUBnTVaRJebVtioHk bW3fl3raQfh69iS3u9lYBxCMEOoVU9DINFZYWwRsAMZoP51A8oX3ZAdhPgG95TDk/VE3 yzSFxQ4Mp5FGj+0jIhPcsZxgNOQexpXYWm8sodlzksK+f5bA1zZKgUaZDcUVN+w8FaqX mmpw== 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 i14-v6si2033722ede.243.2018.07.26.10.32.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 10:32:59 -0700 (PDT) Received-SPF: neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) client-ip=148.163.158.5; Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6QHSnNN088089 for ; Thu, 26 Jul 2018 13:32:58 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2kfjpk88g5-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Jul 2018 13:32:57 -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 18:32:55 +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 18:32:53 +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 w6QHWquQ41418776 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Jul 2018 17:32:52 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 781A211C04C; Thu, 26 Jul 2018 20:33:05 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A5D4411C052; Thu, 26 Jul 2018 20:33:03 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.204.214]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 26 Jul 2018 20:33:03 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 26 Jul 2018 20:32:49 +0300 From: Mike Rapoport To: Jonathan Corbet , Andrew Morton Cc: Matthew Wilcox , Michal Hocko , linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: [PATCH v3 3/7] docs/core-api: kill trailing whitespace in kernel-api.rst Date: Thu, 26 Jul 2018 20:32:36 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532626360-16650-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1532626360-16650-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18072617-0008-0000-0000-000002582BD7 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072617-0009-0000-0000-000021BEACBA Message-Id: <1532626360-16650-4-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-26_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=859 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807260180 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Mike Rapoport --- Documentation/core-api/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 17:32:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10546277 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 64E04112B for ; Thu, 26 Jul 2018 17:33:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 560272AB8B for ; Thu, 26 Jul 2018 17:33:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49B652B073; Thu, 26 Jul 2018 17:33:07 +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 D0AD82AB8B for ; Thu, 26 Jul 2018 17:33:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C2AFD6B026E; Thu, 26 Jul 2018 13:33:02 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BDD5B6B026F; Thu, 26 Jul 2018 13:33:02 -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 AD2636B0270; Thu, 26 Jul 2018 13:33:02 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi0-f71.google.com (mail-oi0-f71.google.com [209.85.218.71]) by kanga.kvack.org (Postfix) with ESMTP id 869506B026E for ; Thu, 26 Jul 2018 13:33:02 -0400 (EDT) Received: by mail-oi0-f71.google.com with SMTP id b8-v6so1934078oib.4 for ; Thu, 26 Jul 2018 10:33:02 -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=WIHiLaGStB2UKg3Wbunri2Porr6mVyQo8haqVQ8qF2jyr2Y8ojwflOmEjBWiOu/qwz u4Se4gQ6JaYipIbDI+7YMDc7Ij/YxXIA5ZKU8Zeie3VYqOD4Qc8Y7W6L/+Aq4SH+QzO3 3V0a2ZDFBaMvAx+k7H6JYeGkso/IXqdxrI4i8a7UFMQ3alNFzu57toUOOGj3wA0EuOxf DnsUnbGxsnlV2XLDpz9yLLX3KhDVYYYz370DejkZlQ8r0wQ5V9xgEhbyTqRIvlPafYKw YQLRqwDYnL3MiUHHMb760fzMsPAYPy9wcsAELm1qi03vCVaB9xkPZqgXBJGZUGM6iwzd n+6Q== 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: AOUpUlHyXxEsxPh9gafDPxX0iUVwECO7N0KAC1IMmxsh3KE1Tep8jE+p vzHmlMMyhcFFJMSvnt9ebzn9CQngj4qcvs45R+GKm4j4zdNKR/k2l7BVO6tm60nCkOwkxFnL2X1 JQfGS3GdkkvT7yaJTEAqq+lra9zkAfagDs8mrvZlC9nEGxedMlDfdu+9MF/p3f2c= X-Received: by 2002:aca:c2c1:: with SMTP id s184-v6mr3145343oif.117.1532626382353; Thu, 26 Jul 2018 10:33:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfmN2laDZ2HD0PGt7CKUzz1l3OJ5GnrAr1tdLKQXzaNY6g0ymd4N1xrSWUMP7wKu18JjfPv X-Received: by 2002:aca:c2c1:: with SMTP id s184-v6mr3145285oif.117.1532626381578; Thu, 26 Jul 2018 10:33:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532626381; cv=none; d=google.com; s=arc-20160816; b=VTZB2zGZYWVBxjqIncCSarpSDfUySnOhwPywq0hGUc/gexAZ0/GHn7RF6VHf+Zl9vL etuXsNs8/6aI2kqv6DMtVHRKCyR2HuoGXBBRkU8EWFnN2wnqvV9VWP6n7nBOgBUe7ap2 W/ZJgVrCnLnzJV/sN9+Msm80D/35VycEnAYxjqPy0EBfvfme42g0Jfub7pQpPbVwCSey zLEEpAxcZsNT4/lo5s5JyytvsCTgxAz7GcLaB2z8uUBNZwq4Q3Wmu8g8u0VvP+ZJJjUM le/7QbWvZy7tUviTh1zd5W6kHVBDgcOQDoKEui0xUAk2bvlEdAG95YyUh/51F2J6QXCB 1OXw== 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=syajquu2gTdICfh6MGFqoSf3wQPWUeZ7G6mOhpq2b2HfTrQE55nb/BxkwB67CjEc4K 0+OzrUWc4UGTJ261QONpfUMQUI8WD+yp6Wd0+8cYrq5r3+RrGJ7Bu4G7oBy9oy1OCZhG E+2Mw4Kcuf+w6raIt9AEOCsSwIH3iLS9hwvlASrAdoVQTH2S9dOZvZBqeBqUal8CvSvp h3oLj8SvNtcDnLKaK2dk6Pt6ryR3m432dkPt2thge+6/uO2iXPGtVszTbgwuwDSlk2HR gTDrZ2TSdpN0z83b7whsUX4zxhyh7yUEVAmfL4ORV/6G4xEOYUmK0cZa4Z8llUxkW21q Qu6Q== 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 j129-v6si1382795oia.26.2018.07.26.10.33.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 10:33:01 -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 w6QHSpYt043124 for ; Thu, 26 Jul 2018 13:33:01 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 2kfj32stkd-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Jul 2018 13:33:00 -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 18:32:59 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) 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 18:32:55 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6QHWshW38273202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Jul 2018 17:32:54 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 87793AE045; Thu, 26 Jul 2018 20:33:01 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A4D9CAE056; Thu, 26 Jul 2018 20:32:59 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.204.214]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 26 Jul 2018 20:32:59 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 26 Jul 2018 20:32:52 +0300 From: Mike Rapoport To: Jonathan Corbet , Andrew Morton Cc: Matthew Wilcox , Michal Hocko , linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: [PATCH v3 4/7] docs/core-api: move *{str,mem}dup* to "String Manipulation" Date: Thu, 26 Jul 2018 20:32:37 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532626360-16650-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1532626360-16650-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18072617-0028-0000-0000-000002E0AD29 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072617-0029-0000-0000-00002398A0AB Message-Id: <1532626360-16650-5-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-26_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=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-1807260180 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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 17:32:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10546279 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 28B72174A for ; Thu, 26 Jul 2018 17:33:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19AE92AB8B for ; Thu, 26 Jul 2018 17:33:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D4A42B073; Thu, 26 Jul 2018 17:33:10 +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 7B92D2AB8B for ; Thu, 26 Jul 2018 17:33:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 85AA26B0270; Thu, 26 Jul 2018 13:33:07 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 80B146B0272; Thu, 26 Jul 2018 13:33:07 -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 6AD2C6B0273; Thu, 26 Jul 2018 13:33:07 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by kanga.kvack.org (Postfix) with ESMTP id 0DDA66B0270 for ; Thu, 26 Jul 2018 13:33:07 -0400 (EDT) Received: by mail-ed1-f70.google.com with SMTP id b9-v6so1081106edn.18 for ; Thu, 26 Jul 2018 10:33:07 -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=BaSHzcAKKk2if7YTJwMUIrOnRr1mvonv5fXFxR1mdoRTzHOaI4qjgY3Q6GSNFGZtYv IXFxLRX3IrnEQZkrj5zVHQjFW9lHXZnf27QjQg0BdiFQs9VaUV54vPHlATccA7JkAEsp Izz1Kh7M94Dp4k4IAEqA/qhd9C0FX3UutguK0P98MtstDW+B/htdT0Ut/EJP+9SUwotX KpbvkFdw+/AfXyCMyIL83YiB5zEzQmQKZ77SAEQGN7wkwKbcZlorqMMK1Q70q0IVC24G 9j/WZg6JF4f8I9sv/qTE6e3TlR1vOtluZCyrPd8OQgyw8Iz76UZsnPBHCUZV6sYmjtzW nmrw== 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: AOUpUlEeMnQctYT62iuwErwbYNcoGJhbyf7LpmZ+oqsZ/N9A/RlReHEn 1GVeq+VpGLa8IoYSgEHEAVK4vpdCvWONfnFh+ZE5BbY9ZzTsMFShK3TScmmHofkzGDJwsbTJ12i 9UJ3r2jd22Nt0+OlHoImlRW7sf3r+wWHwmQzHcrOvdbtOZ+5b1ZbBwJPOYWPTAl0= X-Received: by 2002:a50:b807:: with SMTP id j7-v6mr3635504ede.206.1532626386607; Thu, 26 Jul 2018 10:33:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpelu0YlmQx/xr7mKcXRN/1zrKvOmCT5Kgmy+RfMOJ4zsA5A19d9ThgwKo6+GchNyslMmieG X-Received: by 2002:a50:b807:: with SMTP id j7-v6mr3635466ede.206.1532626385888; Thu, 26 Jul 2018 10:33:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532626385; cv=none; d=google.com; s=arc-20160816; b=L281fR05VCaSDLgfKq5cm3qg0Me0kOBurmohQzaMxEj+C/dZsTK18H9S6Em25eU2md ifbVMnz5CNy+q7hoWZYBxv0Ux9zFOgR575rsHPcwUyYcvyIqWBaaIG7wewSeg9AjXIFU TTBicesT34m2sP6zOVfcIPjs1IwjxJL/BbzQLuKdk1pQHhq9ViastgbAdnoobz8nhnaf opshzABqR1iqtmzJDBtjxMiFwmurYndebp59x0Uvn+TAcMv41xOGuVcX6xoNjbdDmc0O Mvyh4RiHiKgkYI5AC+RPa2n42OPspss3Rb2RpwI8/0crjU2tl0v9cHRWPiml9HkHqet9 NtuA== 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=LepLCrYtSLxmSwMNC8C25GjNGg15ZZVvkJ6KLl55Vj0FnjJsmNr28BXz0/uzKMeFqy sh+K407q8U46vg2vaK69vpG8YJAZurAIXlJnHwzjY7Kjtpkl8rers9Go3roCXfREgwTE oknlq+vS2HPs1BKQNV/WNsHz8zmhR6O/c1YUKDV9+Wqc5kV+yv7pt88iNvcvotzb0eN8 XRoOn5pBqMn34g63p55mJEMdmckvuTIvZ+lRTsDeJ2oHU/oWOAFOrC8qb/gYq1W+o5PC 26q1zXt1mMs5tzsUYOfRoBBrQl7mXbUQ75+tH28snORhuSwaoL8BkQRdL7NLDXLJDXYG xHrg== 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 l22-v6si1579170eda.370.2018.07.26.10.33.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 10:33:05 -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 w6QHTde6130100 for ; Thu, 26 Jul 2018 13:33:04 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0b-001b2d01.pphosted.com with ESMTP id 2kfjrb83jf-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Jul 2018 13:33:03 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 26 Jul 2018 18:33:02 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) 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, 26 Jul 2018 18:32:58 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6QHWvrp36372724 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Jul 2018 17:32:57 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1EAF65204E; Thu, 26 Jul 2018 20:33:11 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.204.214]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 4B9105204F; Thu, 26 Jul 2018 20:33:09 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 26 Jul 2018 20:32:54 +0300 From: Mike Rapoport To: Jonathan Corbet , Andrew Morton Cc: Matthew Wilcox , Michal Hocko , linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: [PATCH v3 5/7] docs/core-api: split memory management API to a separate file Date: Thu, 26 Jul 2018 20:32:38 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532626360-16650-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1532626360-16650-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18072617-0016-0000-0000-000001EC6DA9 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072617-0017-0000-0000-00003241745A Message-Id: <1532626360-16650-6-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-26_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=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-1807260180 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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 17:32:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10546281 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 2D9F4174A for ; Thu, 26 Jul 2018 17:33:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BA122AB8B for ; Thu, 26 Jul 2018 17:33:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F78D2B073; Thu, 26 Jul 2018 17:33:14 +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 A7E7B2AB8B for ; Thu, 26 Jul 2018 17:33:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E26876B0273; Thu, 26 Jul 2018 13:33:10 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id DD8946B0274; Thu, 26 Jul 2018 13:33:10 -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 CC50C6B0275; Thu, 26 Jul 2018 13:33:10 -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 9811F6B0273 for ; Thu, 26 Jul 2018 13:33:10 -0400 (EDT) Received: by mail-oi0-f69.google.com with SMTP id c18-v6so1942704oiy.3 for ; Thu, 26 Jul 2018 10:33:10 -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=XwbHyhXf96Ic3gVfe4CDjywmwYEakU+SX3xrzg9nZ+s=; b=ch7ma16RkiWJ4noAHeOYIlDt3JKk/KTsYA+OAt/lIKQK9Zear655Svr7tivmlmqNgz IBnAnsFeac2TYl/fg9KMQrxhAuLWGMCDZAEOBzmnrbXlkYFR5cZDHfIrb3CnfvJNTNZZ h5SHuZrNHtnDcChQ4zHHKGMwEegshQSc4dE6mY4emDS1COAHtQ6AfH0fEVgoZ5PHLZQh B0d4kPTWFf9zeYKD+pjRoctiDY01EChRThaladKWMX7t7ByHAFy543YQUguKG8AFJ9jT uezNwWQ+kwmsVWcroH76r1TwR6VpBLwD7aIbs62MOATCQ/Exbh9mFfLRTDINuXBzoRrb GAkw== 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: AOUpUlEyuOkjCRnWiE2wZ59wtuefh6ok1uu+2rI2FVaHsVBc2ynfuTkj Jz0F2Fxm2/odTuoE/YmrkxXAvhVbukdx0OM2vOWYJ2tyJ3RTHuFsZmalPZ2BEmTryX4pJooHqqY 9lNsRasf+SSl18yhJGWZcd4tMYOjPLnFtv6QAYASYRquSsWP/hLkv5wRS9EZ3atk= X-Received: by 2002:aca:3f55:: with SMTP id m82-v6mr3056812oia.237.1532626390342; Thu, 26 Jul 2018 10:33:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfCUpBAbyoExQ/jdQ6qgHC8klrWsTTUvcg1Qio+LK1LKNP/SNnqPR0OjeDhlaWor8Sf+NGh X-Received: by 2002:aca:3f55:: with SMTP id m82-v6mr3056678oia.237.1532626388641; Thu, 26 Jul 2018 10:33:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532626388; cv=none; d=google.com; s=arc-20160816; b=KDnmZ3LzMckM9jFv6k50NQUN0bNWyU/qZKykw4tTzVnQD4UEBAE9YS/RM+oAaXxeJO 2Sr2FS+Gf4o34+AfAgd1J4qCDWh82U6FglzXWgfWGcrxF64IFWbAaOKsTLoi58XQGl1K XP//nu1/8Xrpei707V0GpHs3cu6io1aWMfPcTDFmjtSdvb13CDfvuYxP2bDjK0CPi2rS QJ6Kez7T8ZCCBPti5RLINralmr46hvEBcz1zY9j272iGolX0oVhp9Iwd/wC2xPdCv1yf vgZpTEWLxOhttO35tKcDuD8AMAD5mzuMgd4ByPSknm+FJ595a5MQ+xkHonJXwJYwqnxZ jWTQ== 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=XwbHyhXf96Ic3gVfe4CDjywmwYEakU+SX3xrzg9nZ+s=; b=NCnzYn1mGjgQYaQlyq6jArCIjeov3121O9O6vwbYo6fp4yAUioSFQMtK1Adrxu2DkH jHvFSbuA1QJm0/9WEOe1OI2AqeKPDXsFxecpBChnS/ZfnnVY5eXSrDIdkpcoCvg8TcwF WA9Ee0u09OTOzpstRZEgy7sL/T92kBSJ/MnDlI8ER/Wt7fbJfPXoy7ZF1NRMeuEBVbxN jL+DZpl0WDUA4wxaG4g76jKW5iG5wfWo6w1yAI7R8lAeeq1PXgFm5UbPzfNv0LgwAebF WU9j+CLWlTy7DoT9Y0l7RFvFdqPPdI7tr1yNxWs8K3ihxp3MqaNlO0AiOOOzJwrOKmMt wWaA== 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 t12-v6si1260831oif.377.2018.07.26.10.33.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 10:33:08 -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 w6QHSsr0129277 for ; Thu, 26 Jul 2018 13:33:08 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 2kfgshwen8-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Jul 2018 13:33:07 -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 18:33:05 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) 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 18:33:01 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6QHX0GI39059696 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Jul 2018 17:33:00 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E6EAB4C052; Thu, 26 Jul 2018 20:33:14 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1BD634C044; Thu, 26 Jul 2018 20:33:13 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.204.214]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 26 Jul 2018 20:33:12 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 26 Jul 2018 20:32:57 +0300 From: Mike Rapoport To: Jonathan Corbet , Andrew Morton Cc: Matthew Wilcox , Michal Hocko , linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: [PATCH v3 6/7] docs/mm: make GFP flags descriptions usable as kernel-doc Date: Thu, 26 Jul 2018 20:32:39 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532626360-16650-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1532626360-16650-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18072617-0012-0000-0000-0000028F3F0E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072617-0013-0000-0000-000020C12DF0 Message-Id: <1532626360-16650-7-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-26_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807260180 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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..24bcc5ee 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: Useful GFP flag combinations + * + * Useful GFP flag 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 17:32:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10546283 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 52542112B for ; Thu, 26 Jul 2018 17:33:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 445CE2AB8B for ; Thu, 26 Jul 2018 17:33:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 387CF2AC74; Thu, 26 Jul 2018 17:33:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFEE42B560 for ; Thu, 26 Jul 2018 17:33:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C545D6B0274; Thu, 26 Jul 2018 13:33:12 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BDB796B0275; Thu, 26 Jul 2018 13:33:12 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A555B6B0276; Thu, 26 Jul 2018 13:33:12 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi0-f69.google.com (mail-oi0-f69.google.com [209.85.218.69]) by kanga.kvack.org (Postfix) with ESMTP id 7BE966B0274 for ; Thu, 26 Jul 2018 13:33:12 -0400 (EDT) Received: by mail-oi0-f69.google.com with SMTP id j189-v6so1904886oih.11 for ; Thu, 26 Jul 2018 10:33:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:in-reply-to:references:message-id; bh=nDJkqw+NiWI9NTy5rzHL1+ViXwcq7DcYO8Z2zLaa5BQ=; b=AAz/oflo9bFZV5YvMZAzLKn7YQldzsZHekXgD9k1iXmaGCnQjHVCD0iMXgICcCKkum 1q/LhA0o9mdB8UTWnB3IujTpzjQMl4BMiZZCJNDwR93tYl0P46KL82G2786NTCT4Odzp NB8FVpP/zDutUhfhQ6sjU3a+sh08ZjSLxd5yB9PBXGUyI1dfWj/3NJH+TZtfmX3NG4sz 9TjN1+cplV0WoBsc/saViazYegWhxHnVgRqRx1aWiabruwx6ciZQxUC462KHVdVNJzIH Vc3hzrhkaYEtOYNefWhjVgn4B0Op6hmeoXQhEiqUE3PzT+JDBoNpFgIc7pI77JNhdftu Aq/A== X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com X-Gm-Message-State: AOUpUlEzjt8ZcexuUbdrVgCnhbOUOW56eM77oqXQxpvyrXpHw9ODmVls hF7bcK4KbIWqF3dW4Tz50NiANtCuBaX3Rd7L60V+VHmlPKgjqwKdrmeTVy5VigleHBb8Rve4Kko t92KfdI3NxWsE56rDwwEDSnREjPSy7bxwDpZjfodS8DQUMSjMw/scDUvW7+q0FHc= X-Received: by 2002:aca:3e83:: with SMTP id l125-v6mr3055380oia.64.1532626392293; Thu, 26 Jul 2018 10:33:12 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdX2NUzUHjtTJLDkYauqtMRkOLWoOsgu3ikUBHxqxeNDjbgRqE0EQjxyckrh0Fr28u1mmgF X-Received: by 2002:aca:3e83:: with SMTP id l125-v6mr3055283oia.64.1532626390829; Thu, 26 Jul 2018 10:33:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532626390; cv=none; d=google.com; s=arc-20160816; b=GcU+mFImi7yiDFq39ckdPQzCHazCYZu8AuGC1nsGtlsbEOpUkAnGeptsVMhQjxhhbK PPZpxM8xfe+LLZM8HQm/erJZienhYHH8sZ0nAL5J+fZguraS2Q5akqvKsODDJ+0hCU91 VLFAbG4k+bgsNjaQT8JXjH6sdQTX/nb0wOfsjFbJYdaOEosElhXcAI1ZmQaagBgBPYc3 hRPOuQlKY2eYRW14UgBY9YvJ39Bm6KhgPOQIyLyHuks1GbYiPQajnS7U9qqCsBNfFh9S vOM3kvOVo4+w5i8lBFNkpKc2KUkPeOWaz/QJwvRRHmrMkwjJhsNZRdD7d4x1oRKnxMrH e5Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:references:in-reply-to:date:subject:cc:to:from :arc-authentication-results; bh=nDJkqw+NiWI9NTy5rzHL1+ViXwcq7DcYO8Z2zLaa5BQ=; b=JtAPHfn4iuSiX9m2POUwWDoKPMm7dAuOzAXdRoVnMScO7/xLYKhqAAv2rqQColWAPK r9orLwU1HH/B9VaPfhZQZs9bwxXLEQGqS28RruPPY4aapqKPgnCTRZjdAc1HNpBw6ycz IMN8xlNQPCQR0jAvdUtfSZFRHN7zriNz0hOVlNyGhfjsbxEldDHCWIaoreSo8t8APmgZ xHALYISaDRY140h8REYBX3LsdtXU1rw1vFW929KnjAcyUtx0BlxhP+FJUjxgBuBkprar 0Y0XDK6P/i3kIPYz3K875VqJadGuwlDRs8laeWqUhYnFNNmUMrb/pP4RkBKrFv63VsBn nBSg== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com. [148.163.156.1]) by mx.google.com with ESMTPS id m83-v6si1339711oik.0.2018.07.26.10.33.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 10:33:10 -0700 (PDT) Received-SPF: neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) client-ip=148.163.156.1; Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6QHSodn015106 for ; Thu, 26 Jul 2018 13:33:10 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kfhj3be8w-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Jul 2018 13:33:09 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 26 Jul 2018 18:33:07 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 26 Jul 2018 18:33:04 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6QHX3hT39125130 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Jul 2018 17:33:03 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A5576A4051; Thu, 26 Jul 2018 20:33:16 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C75C3A404D; Thu, 26 Jul 2018 20:33:14 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.204.214]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 26 Jul 2018 20:33:14 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Thu, 26 Jul 2018 20:33:00 +0300 From: Mike Rapoport To: Jonathan Corbet , Andrew Morton Cc: Matthew Wilcox , Michal Hocko , linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: [PATCH v3 7/7] docs/core-api: mm-api: add section about GFP flags Date: Thu, 26 Jul 2018 20:32:40 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532626360-16650-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1532626360-16650-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18072617-4275-0000-0000-0000029E6E4F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072617-4276-0000-0000-000037A672E0 Message-Id: <1532626360-16650-8-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-26_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=870 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807260180 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Mike Rapoport --- Documentation/core-api/mm-api.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Documentation/core-api/mm-api.rst b/Documentation/core-api/mm-api.rst index b5913aa..46ae353 100644 --- a/Documentation/core-api/mm-api.rst +++ b/Documentation/core-api/mm-api.rst @@ -14,6 +14,27 @@ User Space Memory Access .. kernel-doc:: mm/util.c :functions: get_user_pages_fast +Memory Allocation Controls +========================== + +Functions which need to allocate memory often use GFP flags to express +how that memory should be allocated. The GFP acronym stands for "get +free pages", the underlying memory allocation function. Not every GFP +flag is allowed to every function which may allocate memory. Most +users will want to use a plain ``GFP_KERNEL``. + +.. kernel-doc:: include/linux/gfp.h + :doc: Page mobility and placement hints + +.. kernel-doc:: include/linux/gfp.h + :doc: Watermark modifiers + +.. kernel-doc:: include/linux/gfp.h + :doc: Reclaim modifiers + +.. kernel-doc:: include/linux/gfp.h + :doc: Common combinations + The Slab Cache ==============