From patchwork Wed Apr 24 19:19:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13642429 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 DFC1BC10F15 for ; Wed, 24 Apr 2024 19:19:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 327F66B02DE; Wed, 24 Apr 2024 15:19:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2B3916B02E0; Wed, 24 Apr 2024 15:19:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 108A66B02E1; Wed, 24 Apr 2024 15:19:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id B3CB56B02E0 for ; Wed, 24 Apr 2024 15:19:22 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 4DA8E80FD1 for ; Wed, 24 Apr 2024 19:19:22 +0000 (UTC) X-FDA: 82045388964.14.14E1853 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf01.hostedemail.com (Postfix) with ESMTP id A1E0B40012 for ; Wed, 24 Apr 2024 19:19:19 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=SvtOMKeN; 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; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1713986359; 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=jTdOL1wHgWFJQAsru/KeoeJ7ur2RYjjmLo1RNUBncaM=; b=vHfuchPgWCjlalc+M3gHZimTpP8TZ82tmQddunfQhAc+/Xf5H80RMsfJsTUFZoE9yurqtU gT/71tetrJ0Rm/+CgTQhBEXpZPKchdW4esfAa714Pa2j1IfKrLPvvaCKXw162ocfVQnr/G q4XgJMy26vw7A+n28zN98dPOR2VxQCw= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=SvtOMKeN; 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; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713986359; a=rsa-sha256; cv=none; b=AZOHUvKfUVJ4F7EGbnfA8AKlhZwsqXzEBjULx1dKd6zeRTTHbOY8MZbHyFnsRTGFZhYHsQ 8bUKatVmv6TF8UfY7mFv+LTQrdyHbH1rJrpqtSH1b/iVOZh2ptQUo/fmwcC85KRBNGjTMr tMzjJGvP8Eal43HGdLOMW4OhUH+mftw= 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=jTdOL1wHgWFJQAsru/KeoeJ7ur2RYjjmLo1RNUBncaM=; b=SvtOMKeNywCYePJBCOY3mbTzqu 0bQocwj7rrRJnjBGdTDm1oIgQCWX5F4NnxY8Y4zYyHfFBFiIYWiO0s1M0SgDW7qM49Z6J3RGEAl8q DRxewxt3kGzw52iY8+Y3KUDioqauIgjL8P5oLtruDRnv0csKuaE/FSBp1fhoOZrFdn2lFJMPrTL91 7W0ukweUDHN5wH0NyNG2TcM06URnRR+O9M/aO0MS9/reRn6BDGXYkt72bEhbRQB7D24lBn0Dcgdhf AECg170JxX0Q4zZWJHZ496BhbnOHG7mpwo9RmfVB4G6uwX3b8eyfAiz2sEDl6oTtL5SP2HdeuLDfc 1pevHwYg==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzi9E-00000001W42-1aZx; Wed, 24 Apr 2024 19:19:16 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Subject: [PATCH 6/7] mm: Add kernel-doc for folio_mark_accessed() Date: Wed, 24 Apr 2024 20:19:11 +0100 Message-ID: <20240424191914.361554-7-willy@infradead.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240424191914.361554-1-willy@infradead.org> References: <20240424191914.361554-1-willy@infradead.org> MIME-Version: 1.0 X-Stat-Signature: qx9s9txuj93r7ysstykbphg8fiitzttm X-Rspamd-Queue-Id: A1E0B40012 X-Rspamd-Server: rspam02 X-Rspam-User: X-HE-Tag: 1713986359-46914 X-HE-Meta: U2FsdGVkX1+TovVpRrwTSeKQpCyWpQXP9fmUQnp9u/NJ9gOlpdeusSHXs3WZjlx8EnViMXfCNnwczp3qxBOrWQ44R2ejWn2TPv+SpWPqhC83UVhsmG94E6rMkB4aPS35NmulYY6qlA1gJarTnFHdDZJgEAsntawkqvKdpLvsSyJ7NA/k5h1AXTXx281zBgphjuoD/mRSiD7plF9R2N128ipAYZbE+4pewowzBDf2kv2qOC/EnNcuI+xMuvcC4EAth3avx4wynFKef+PytassykixnAs+q57wAjNLYfJL41eDpBlCN6phaRzMyUR2W0Nov9usupxnk5QxtDJGbacL2qEYhTxmCkc3vHtOhaA8dkJWp72vTcd51mO46SSpTAB6uUla8HFtGnJtafuPI4+a99Dz4a9h77LvTzT8RUP6Huyx3GB/LpBSFo7pxblv3zF/GN5DO9VjSqc2kd5N1+V5AfNrhcxXzl1YANIh5Nta6q3+r7oKjuyT2FBcjrMnPA6UKznVAjf6sdQ3VvLOqyteL4TvOJrAqK3BoK8ZRy0IyIFAG/EbxvzGVpUKsISiIHQdzaFSpRsYE88w+vkI52dd6Pq6x0MgWFXjo4b0CnvI6q/9F37zKJsA9XGgrvK1JQ6L84Xb7pBKL5OIWxS+30U09yc3YtUxLHMkIO6cfExT7Y1nwNChigyA3AqnXseA3ngmJSF9glROb217ul1/O+iFbkciAY3Ul0RAWwn6eCdTjLHlgY2tG3tYYR4xhiTJU4THIUN+mtd9Z7LZWI+CCLFeFsNRcCczrxKwYFs70xHGplkE3mTF7VM96HoQzP1/qv76uNfk/viU2TXl0ndDiL0SdXl73HPLaFJ8uPuRTqMiiSt3zDKTXdYGbgx9lhYiLoY9RrIg5kCOsfCrDP0wHvYbXOjzk52uCBDUxJwOhLx0Nz4lHkEkRUHtlGUVyuzgnubBv6GWplHKIoqCZspIGtQ Afi3Yf2y u3U+VfjJ8T0sKs1ZM5m9T7QcVmqiSfw/qKs4y1FcV4Qbxyl6BimY6jBng6QNwSunQ7hNPSrhVBKXb1ExeSO1jye7JhqSSoDx6sgpx6pudWcnprHPBw1EmNRh4xGRdqDvky7nLLSTQvp0/FuhqvjC//uVlFgDDW2MrXttzUV44Is/p+WNoPWrV6eFgVTyD13eiB1X0EvlT2wpSgo3Jc70sTnS3N0H9+WitzPpG 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: List-Subscribe: List-Unsubscribe: Convert the existing documentation to kernel-doc and remove references to pages. Signed-off-by: Matthew Wilcox (Oracle) --- mm/swap.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/mm/swap.c b/mm/swap.c index f29b3018ba3a..73bebd3ca6b7 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -448,15 +448,18 @@ static void folio_inc_refs(struct folio *folio) } #endif /* CONFIG_LRU_GEN */ -/* - * Mark a page as having seen activity. +/** + * folio_mark_accessed - Mark a folio as having seen activity. + * @folio: The folio to mark. + * + * This function will perform one of the following transitions: * - * inactive,unreferenced -> inactive,referenced - * inactive,referenced -> active,unreferenced - * active,unreferenced -> active,referenced + * * inactive,unreferenced -> inactive,referenced + * * inactive,referenced -> active,unreferenced + * * active,unreferenced -> active,referenced * - * When a newly allocated page is not yet visible, so safe for non-atomic ops, - * __SetPageReferenced(page) may be substituted for mark_page_accessed(page). + * When a newly allocated folio is not yet visible, so safe for non-atomic ops, + * __folio_set_referenced() may be substituted for folio_mark_accessed(). */ void folio_mark_accessed(struct folio *folio) {