From patchwork Fri Aug 18 20:06:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13358305 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC7A8EE4998 for ; Fri, 18 Aug 2023 20:06:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 26913940076; Fri, 18 Aug 2023 16:06:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 217A3940012; Fri, 18 Aug 2023 16:06:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0902C940076; Fri, 18 Aug 2023 16:06:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id E13D7940012 for ; Fri, 18 Aug 2023 16:06:42 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id C022CB2D9C for ; Fri, 18 Aug 2023 20:06:42 +0000 (UTC) X-FDA: 81138308244.13.F29A9FF Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf01.hostedemail.com (Postfix) with ESMTP id 20B8A40012 for ; Fri, 18 Aug 2023 20:06:40 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=DtFJI03c; dmarc=none; spf=none (imf01.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1692389201; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=H22wfoU9WmEkYEOI01RrpJTB8uzVeuDiXA5dlaT4Dc0=; b=U/KXYT0dD178gPuPG26LQYsln0hmNPTbzUhIZlOQt03IebCj2WxyHha0djBM3PIflfq8Q4 r8T3d6fKpJt+oquVLmr3otoA45vy+dhYOottJs0+GnL+u00cjA9TYx0/K7q4uSBkGpfGOU D9cWbnj4/N+xlQakDgt+qGjCaEWvh6Q= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=DtFJI03c; dmarc=none; spf=none (imf01.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1692389201; a=rsa-sha256; cv=none; b=2jPTikZvQsJt3SXslFTuDrExJ49EEgh7qxNsNeEIKk+dCtaDCupr3jUn9l0v7XBzoBHLgP EKDSHN1ElqTXsVzeKu17gDO5ydBjCoIL2BRsR0xl1TzTqiFw5tBrKGHkBfpmKxKCOG9QsG tk9eHfozWF7fcP+qkYX2sSWloxPEWv8= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=H22wfoU9WmEkYEOI01RrpJTB8uzVeuDiXA5dlaT4Dc0=; b=DtFJI03cyruQ7/gwxPDSCMj7Mt P7ih/uMjbC/Hacz5WgyFcuMutT4pErsivhRTYQEcszmURU+a9Y575Pn7GK61xVl5JRekPeoM89EVX ZoP1r+vGiVM1o3Yd71Zr+SowTe+QhoRKq6QridfZAiz2n1aXhpZ0Ny31IQVbh7NUlF/bxVDWiLhN+ /hsHBY5hsZ/kkSh0S1MTJJXm+CnVRW8d8B/yOBOPvVua6tf9awy+XGYc0GMzJTUej9x7JAz4+lbPQ O34tQw0e2/7/EDgYoKrsvSRiHAUmoGY2PoF+R50Ie/03rQ+AYed5NnsHzh3enTnSwUNnxNyUVafeP dg+Tw5yQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qX5js-00BPVA-Jw; Fri, 18 Aug 2023 20:06:32 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, Mike Rapoport , linux-doc@vger.kernel.org, cgroups@vger.kernel.org Subject: [PATCH 2/4] mm: Fix get_mctgt_type() kernel-doc Date: Fri, 18 Aug 2023 21:06:28 +0100 Message-Id: <20230818200630.2719595-3-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230818200630.2719595-1-willy@infradead.org> References: <20230818200630.2719595-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 20B8A40012 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: fqby73m3515qk6gg9cpkihedbr4ye7j7 X-HE-Tag: 1692389200-4618 X-HE-Meta: U2FsdGVkX189XcZK+9qoEyQ2g2owTRb3rxMA7tT8q73alEa81vt59rdQ42p8c0zXnOMmeI4dKJKH3qQZ4DkoJ/n3HZ+Nnxduam7ng5hQLmkJYZjb8ptsWTuLh2T2gcV9Fn7+p6ZK+LmEr0NUG1x4KXbhnBRT47dhHMmHGugdFQW9BY3HMk51PHxooHaM1T8+VBmLAU5eFSH+ElmIfLNzAzJmnilIiFZeGUh9ZwrgpWK9NlzMX1c4FNPQXTbqMSvgrYhNq64X2Him0LyH3Ng8THkyD/HVVB0u0HoOIlp8cNp9wcUMpG2qjUXn7z+56QfyGO6HJT+ElTnZV7fYO3nmzn6L2Ww37aYXDSXsSCN9VCLij935VqvtdiVvq/HjrdrxD4cLZ8dT+XOpz5BfkjlemOewhuBLXz7fsBtj07sv8IOhzVmYel1zYvoI6mD64IGfDt/VnXhQ/53v5Opg7+GoNoeGCXeh5KPmzPDu3mdEwT6JtT1rfCQAlcMVpQgRH23bVomR3nri+LJgOOeAjqUDlKUBhki580ZpOFJvoqEW1flzWb7RCT1cc4jGTgvWF2QSwj1p/k7sq6Uz12xzwqUmsUpS1sXtvgY7GVq2Mf+UoeYYRyPODhS2oY5npC8ODkVBuqvkraJxgIBuHYDeWd9cWP7KhadfxuDy7SwnDfdsXNVGagURbaiN0sW6rYWz3TDcMVd+WQwvC0KhQ1bnzkw1XGV6poCamnq3gDOKLV1yswW0rd5pNNbuP/RO1QGrsYgc9PwCaLtma8oJccot7hXS/BR2czWF1VJo6BHk4WxCOda+yZdJfVra3IvOG9tSgIIHeomnnpMdnHjoD5uLH6/jwwDYAnpoMbdMU6d/zc+oStYoxLOkloZHgYe9JbmI97K3zr0H7W8aPs7UgY1E7iEPIjpfmWpoj0J5ZqEaLtZxKdsAyk/iZXiBrnHAk6/lMbeX9e7fQvr+Jvl3ZcgQLse KmXWC3ks KMwBsKKDHtHoQFNjt4fEujarpagKDNB+6ufRoTluTFR/q0ZaKHz9ISRHD8EpTsMtbbIEAwZWsDkkG4M9kJH7E3SdFdTpvik1/cWuACuhY1so7x+qee6helX9z5uYq//j27mXk0CT+AhB8KUhwn26X+MyHFesSQ1qBVSmXwWzpM/bB9lC3ewO/nFMHUtImDcSEPHQ23HikVLwU54ni45bAI5zwxIMi8AKWiY+m 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: Convert the return values to an ReST list and tidy up the wording while I'm touching it. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Randy Dunlap Acked-by: Mike Rapoport (IBM) --- mm/memcontrol.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index e041ba827e59..cd8b3ae6b8d9 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5850,25 +5850,20 @@ static int mem_cgroup_move_account(struct page *page, * @ptent: the pte to be checked * @target: the pointer the target page or swap ent will be stored(can be NULL) * - * Returns - * 0(MC_TARGET_NONE): if the pte is not a target for move charge. - * 1(MC_TARGET_PAGE): if the page corresponding to this pte is a target for - * move charge. if @target is not NULL, the page is stored in target->page - * with extra refcnt got(Callers should handle it). - * 2(MC_TARGET_SWAP): if the swap entry corresponding to this pte is a - * target for charge migration. if @target is not NULL, the entry is stored - * in target->ent. - * 3(MC_TARGET_DEVICE): like MC_TARGET_PAGE but page is device memory and - * thus not on the lru. - * For now we such page is charge like a regular page would be as for all - * intent and purposes it is just special memory taking the place of a - * regular page. - * - * See Documentations/vm/hmm.txt and include/linux/hmm.h - * - * Called with pte lock held. + * Context: Called with pte lock held. + * Return: + * * MC_TARGET_NONE - If the pte is not a target for move charge. + * * MC_TARGET_PAGE - If the page corresponding to this pte is a target for + * move charge. If @target is not NULL, the page is stored in target->page + * with extra refcnt got (Callers should handle it). + * * MC_TARGET_SWAP - If the swap entry corresponding to this pte is a + * target for charge migration. if @target is not NULL, the entry is stored + * in target->ent. + * * MC_TARGET_DEVICE - Like MC_TARGET_PAGE but page is device memory and + * thus not on the lru. For now such page is charged like a regular page + * would be as it is just special memory taking the place of a regular page. + * See Documentations/vm/hmm.txt and include/linux/hmm.h */ - static enum mc_target_type get_mctgt_type(struct vm_area_struct *vma, unsigned long addr, pte_t ptent, union mc_target *target) {