From patchwork Wed Apr 24 19:19:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13642430 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 67A94C4345F for ; Wed, 24 Apr 2024 19:19:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7BCC36B02E0; Wed, 24 Apr 2024 15:19:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7470E6B02E2; Wed, 24 Apr 2024 15:19:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 598086B02E3; Wed, 24 Apr 2024 15:19:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 377876B02E0 for ; Wed, 24 Apr 2024 15:19:26 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id B610C40264 for ; Wed, 24 Apr 2024 19:19:25 +0000 (UTC) X-FDA: 82045389090.28.32A7031 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf01.hostedemail.com (Postfix) with ESMTP id 0F01A40010 for ; Wed, 24 Apr 2024 19:19:23 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=rMJIvE0j; 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=1713986364; 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=i6rlpTf8bAf7Aunu38ehYJMaaJBBkK8Roanu2+98vag=; b=zV599X3yHcv4lZJyT+BHCh1EyFR5Fzxv2YjeC/QO3A8DLjSbaTawiu+WhWzWJlNupz1/U5 xxFo4fp6u+fbye6uaBhqtTRKT0pkA+1ndBbLdPNsmYFKl8UW3WveSgMK4VTWIjc0NP9sjf 1h2F+AQ/iszgrB0KQqpzKy1f19d+edI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713986364; a=rsa-sha256; cv=none; b=Bm2vNS7ycnGPtsCKk/Aqytlc3x9ohQHlDk1VKDdYXb0Abh4aPvKq6skXtYjg/Mx8PqODBL SE9cWpeRC448cvQ829lbdiqTPDfy3R4Eb9hyeILHWy4kuK11iWHecTeB0bPgVqg5mBHpTF l26IictwiYu1+VR5rmRBq0Km4rUy9CY= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=rMJIvE0j; 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 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=i6rlpTf8bAf7Aunu38ehYJMaaJBBkK8Roanu2+98vag=; b=rMJIvE0jG5u6xaoQUjNxF0NUQK 7aHaNvIpSozkRPdWBx4xdQmGuRTVWyfWqmyiXRFIviAeJjxkLS5vFsKfsmUjV664Lnm+GFUsSosUq 0/PO+bgMnJyHDITeWaNUEsUUo8EOFHny0rZfRZEhibZt9dZOO1weZ7jP4TvZNTF8lbUDodwuerQ78 CtI29MXNZFuHMnzceiLpCXkCVa7+B5UtCB+PRkF3w0outkKg/ezF7inBlRIPNPdBVSKwd/O7oARUv I4BleNZIUmIB3Bz5ifhU7/+CcgjEqgFhDpWpQfr0AYDnIZSe9w1HD36O4gBLapGuPkBpBnqtB3P3D elwLbiIg==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzi9E-00000001W3n-02OO; 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 1/7] mm: Remove page_cache_alloc() Date: Wed, 24 Apr 2024 20:19:06 +0100 Message-ID: <20240424191914.361554-2-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-Rspam-User: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 0F01A40010 X-Stat-Signature: 6ks1bkqsij6p4p87jt8eniagddo5p988 X-HE-Tag: 1713986363-362713 X-HE-Meta: U2FsdGVkX1+dmDcRm5Z+GvmMGrG0NRk33ZnXBHINeAchGaVFuiXoYqeV91sT8x0Ou/srS/G8/ijBPXOqpov66MFMN1msTovWqAXj67AB28d/JI9EDqEmjXCV1K7wveBka96BUwC7r+o8N5Af1V6xGbOxXuSmKEnHlOVkOw0jArU8YsfbLCQhOiQ2OHYeDrhv811NZmYfhHzfz9FCHNwOtFiH06C2PGB6oNdw5XR6PKNg5/VSwS6DpR/ozb9xjeB7dlcWfpoe9hDLA/Eq3mNnWyZh82IJZHZh9E7kCQVwIjJLlCIljo5HmLDoJYYMlt78v6+NfoItSSL92r6mDZ/bRTzWiLAEylTGLZAncQ0K7PbHQioUgx2fOFLedSMo39tKLuy3hmDhamVJ9lO+4j0D3ttBhM5PyVgCfebNifTzzTfmmQ4jmy/kL6IJI5nf6aDAEWzQSDCA6W4Wm1kZ/PtURMx3C4kub3/xMQJKELQPf3bIrBDcxgjqxwCVjIFQIAoQXLztNj1bTYn80z99DTN5UKfCPcwixw4bLgAe9oQvDYnUBCJolbC8wriStcAe0a0zWbKFGCDflJjBPq9xpXbaQixMtgtjnwgsR9zo4M6SZHOnQQwTtnuIzKVN4q9x32p3P7wSehoqzjGY89MVmiSTZpmCcSQycLUiCBfG4CbniGUcabWzW2zUBzwQrS2ksXr/9JbpJz4DxnMZp/Zz34nug4GhZI0YDm9A16fXstt8B/lMkfyhcmqph9fsyGt1+8VAEuJNym1ivjq9egafJEP4fqbYR8CNlm0kNHMfZyNMcE6W2ZZ3zCHS8mJnDVw7ZjeICd4A7BFt6SVotu6iYFkrmNUp1+rxm51KeTYPwBAAKjb01Mf4AU3FsFDkvMD/b5yb7kZi+2GE3UVrq3DYMI3jQQt7FsXy/UBCrGFydkP55GR0JBpO/b2w+mNFq2sBQ76gkc4swLowNy7yBWtZuvp lRRbX+0P cMv1JP8WkuG0zUnTeQbzdF08zEx13lSImE2gTQtEL0f++21wUMMrD6RXoIIcMlEN3hZVJP1FlCYV+2fFk3d7KofAHmBxy8sJwk1dBqmkt1SaTV9V0Ge0TKxiyF3NoLc/oj+9ZTax82foCKlES15nsSMCIZZaQbmyPeHGoz89Wpec90k2csnHtw0MR6y6f5D0JCAleEFbWer9VnhBK8+8mbdAsGolrmVEgu6n1 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: All callers have now been converted to filemap_alloc_folio(). Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/pagemap.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 941f7ed714b9..1dcaf86fb615 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -557,11 +557,6 @@ static inline struct page *__page_cache_alloc(gfp_t gfp) return &filemap_alloc_folio(gfp, 0)->page; } -static inline struct page *page_cache_alloc(struct address_space *x) -{ - return __page_cache_alloc(mapping_gfp_mask(x)); -} - static inline gfp_t readahead_gfp_mask(struct address_space *x) { return mapping_gfp_mask(x) | __GFP_NORETRY | __GFP_NOWARN; From patchwork Wed Apr 24 19:19:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13642428 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 68C52C4345F for ; Wed, 24 Apr 2024 19:19:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BDAAA6B02DD; Wed, 24 Apr 2024 15:19:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B3BBF6B02DE; Wed, 24 Apr 2024 15:19:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9DC1A6B02DF; Wed, 24 Apr 2024 15:19:22 -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 7EE816B02DD for ; Wed, 24 Apr 2024 15:19:22 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 2E731160616 for ; Wed, 24 Apr 2024 19:19:22 +0000 (UTC) X-FDA: 82045388964.28.D844A48 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf06.hostedemail.com (Postfix) with ESMTP id 9921518001F for ; Wed, 24 Apr 2024 19:19:20 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=kAYqqqdJ; spf=none (imf06.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=1713986360; 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=nB8kSxT/uDkbRjB1TqsueuuPTaw1paGjikHn3nogoCY=; b=FqiceIpolQUp2HmDvYRsxVGA9gzhnWkwKRWJpJJ7tg287+J6hdjxXtk6FCvP9LN2pDW4lR TOZ7Hg6zqrvbNnwyRuFo+7HTRSkIJDfff2rYasH9iywvK/lSE1neXs8NQWAG7HIFYcW2XX 2CqyhfOaPdYpGkIWRfSCJvXmdkZ5VXs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713986360; a=rsa-sha256; cv=none; b=I9fF+gr5PCXRtaXzIH75D3J1Dp63ZRdKn9Jq1qhn3YEqG6gZGi1WH9UICLC0iwYdU+kdM+ 0ocN9FIM3iX/qlIf3njH3nWfdUr5sZKsnyQbwUhKbr7qA/b2Gkqgl0dbCV85UDC+eZSG5m ANDcudCO0Joz33/4tOXnmxryajV2MZ8= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=kAYqqqdJ; spf=none (imf06.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none 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=nB8kSxT/uDkbRjB1TqsueuuPTaw1paGjikHn3nogoCY=; b=kAYqqqdJUWVeRY6OPxvty2oW80 bGpBRV5ujlbD9R17Z9z6fHhiDuxcesBY+aNCR7Rf0R9oeJefvcYCGvyecpYzskZE5N+qR2ZFLwFyt NyCOP6N/DnGI5Av9t9SfUfYa+JtJ2Q14AsERiA8FxqCBq9QWwM4p6Gt/wqSUSYwQZh+Ra9mQCAsAE m6wyhs9DKO+eWt2RhlCnYCi4vndPB4NiOs0BNQqS5UpZnXjEzDeBUjyIWr3qbqoS66hSEQrnGKqAo O+xueNgQW0gL/OM1yGEU3AguIw8TgvOu4o931Vv6YtXO5fFN1NFWa08RruoCfqpCR7011Qm1P4I3R Kwve8UHg==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzi9E-00000001W3p-0Jfx; 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 2/7] mm: Remove put_devmap_managed_page() Date: Wed, 24 Apr 2024 20:19:07 +0100 Message-ID: <20240424191914.361554-3-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: nwqtwhtyhkuunas8w13iy5ppihkfscbq X-Rspamd-Queue-Id: 9921518001F X-Rspamd-Server: rspam06 X-Rspam-User: X-HE-Tag: 1713986360-375753 X-HE-Meta: U2FsdGVkX18u5Dj6xi7RAjbtv/ELV140rwJQGN1tSJ9bPKroW+9CG36I/toO4RtFwj9El3+JL8JZdrUIZVA5/UhyyXEp4DO6ozBt25yBH8F0rUJuq27dTNFR2P35lerCGBu6jNQ3ErrJBaz0nCGW0xkqlLldgR11omZAnNz4bMr3zSfoWjMfoAnVkpEiZUpbZJ0Uzmvb42EEBQEb5BGxhP40ulibSYLywWtCNqScfpsI86Lg+F3Ok5paBsGC/JfWLlf/0+gzRZK29BEKmwMfOoSLvUZdc1KW0rS2CJLfY48eJkoGlCaqoKDxzWuK/CA7MME27dROks86e2kzvicjhFFJ+ptKzib3yAMs3hETKmRjAdk/KcDmxy0bXavdC9EZd2hIpaMkGbaYNyOAxNJV1OJc7A5bbkkDUN1/Po6+songQvgS6oXF1DYrwhSe9sYYVsad8CUI5Ve7bkH0Wqvmhlf2WEuXXPdiSJbfZBz+oAPRFN58x+sCaNFvy14U+E87C8zsXun+U1RYMmTEuKzGWgZkvOR6VCN6MSSQmMGAXcliCV0SJxRvRTILtKhxU013k8BELKQJDdn0udm4BsEFyQJtaPSilUp+M4ON0kpir2HtyXBtbHdc8raDQW0hbKTPfWoK9RMzLmz44VRBpuzgmLEw/+EQdwbG0ME0a5uj/QYZZcBRxRIa+EJporsBVkBuoZnHlriFau+wNab8vfid6y/Cz3k5LB6OwWM9RS9i5i6PA1B7mz3QY/8OUKvYAtLa6GorCXQkAcvl1HHQKneMQE9sy6JoiDeJ+PEmN8cLqarmCIEFsm2dLGLZSWLoB9kriwgCLmGjm4rHCJBbq+qWOLBTI7pD9pWDLh79K6so7cwyhq5CvFFjKrp81MhXvlvvlU49rmdeAKJZsi4M1kuqUgU9uWE2+R9Sig2Dmy/1o9DktHzq8+0uKFUVaI59kW36y/RqI0QQSBJxKEBJiE6 wko4fuDo JQAPDYve7fjn91GMmPATHb/0lhJ7KSk/IR8MfP/QxgL94n3Qk9WfIzw0Iel8UZQdP2rHpmwrlO90naXxYd4Pn0dLKrQ1dtGalMp+uHFBURY2a5uw+7uqCI3PKmTu+fSdkCDMP110JLZz/a3OW0U2xaTutnsGGMMwHFZr2mMPS4+SnibquO6WhG1W1jtNIyfZAEJAGLvnhyR5Uprfj1Us24DHtDmcNez00I9jl0aUJdSJBnZs8VyEnph3BU7TJBVovn2IP23WXP8eFMj0= 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: It only has one caller; convert that caller to use put_devmap_managed_page_refs() instead. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/mm.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index e36db5e4509b..070a6e2d7222 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1453,11 +1453,6 @@ static inline bool put_devmap_managed_page_refs(struct page *page, int refs) } #endif /* CONFIG_ZONE_DEVICE && CONFIG_FS_DAX */ -static inline bool put_devmap_managed_page(struct page *page) -{ - return put_devmap_managed_page_refs(page, 1); -} - /* 127: arbitrary random number, small enough to assemble well */ #define folio_ref_zero_or_close_to_overflow(folio) \ ((unsigned int) folio_ref_count(folio) + 127u <= 127u) @@ -1576,7 +1571,7 @@ static inline void put_page(struct page *page) * For some devmap managed pages we need to catch refcount transition * from 2 to 1: */ - if (put_devmap_managed_page(&folio->page)) + if (put_devmap_managed_page_refs(&folio->page, 1)) return; folio_put(folio); } From patchwork Wed Apr 24 19:19:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13642431 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 7B565C10F15 for ; Wed, 24 Apr 2024 19:19:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A2A0C6B02E2; Wed, 24 Apr 2024 15:19:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9DBA76B02E4; Wed, 24 Apr 2024 15:19:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 792B66B02E6; Wed, 24 Apr 2024 15:19:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 51D0F6B02E2 for ; Wed, 24 Apr 2024 15:19:28 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 19BDC14035E for ; Wed, 24 Apr 2024 19:19:28 +0000 (UTC) X-FDA: 82045389216.21.15EDE4D Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf16.hostedemail.com (Postfix) with ESMTP id 767ED18001F for ; Wed, 24 Apr 2024 19:19:26 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=nDeH++aC; dmarc=none; spf=none (imf16.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=1713986366; 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=nsHnbes68x8DGbgJ42X4Y2yPCDwaxQ838mkvU2xkcMQ=; b=rvp5/El+pyfvrxIuM2YQ7bVEb4nRHsSgb88urvCJFwqTuR/VdjeKdy9XOoU0a1S4dncWBb Jp4g6itnoTK9U8URrNwHQ0fd7hfvcCWdpPYELjl1+K4tBtPtIhr4NTP0r5xlmo0qg3dq9O huhXcoTAQ+3EtPRO/+ZkLf7TKtM9vj4= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=nDeH++aC; dmarc=none; spf=none (imf16.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=1713986366; a=rsa-sha256; cv=none; b=jjt6WZ4E77ok8WzCa9ho09/bW0l9Xt/DIDAR1IOwEAyqspTYsFdRiPiZO2dkiHpRRi/4Za Y3qkELY8qycdDfnxy0PCV2FscZyx+o3t4qTG72k94UrcKIGIvnTShRwleLHtEg7SYKEqi4 glwpf680m1lkunRdCGz6QIZV+rPex+I= 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=nsHnbes68x8DGbgJ42X4Y2yPCDwaxQ838mkvU2xkcMQ=; b=nDeH++aCJR/1ErRdvrZYIcNEzK e9CSCfAgcGXvWTTVT3QYzmb/jCHgvmr9oCd3dJeoPupkpYu29yte0R0IICCRmFsZMwkMp99Lu1JRc jka1pMAO7s2Ol08ppFok5wAva5eB2LN9u/J2RyXfpGFV+gXctSeNhnLU6dtrXvPnKf0YouPaIYyaG r51Wo//cSpa1pYohmksP+ruYHf5/Ruu5KkTbmymPr16q+UYcz3ShmXINEoVRbyJGh3UEk/8CexDCI vgFf7uuz/kMquYyy4T5h3tMvUmvMxIyS+ReZbALz6z+ayNf/bCchHTkpRxCFHGpZH9u+0vs0qrxIn O9sc69Rg==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzi9E-00000001W3r-0cLB; 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 3/7] mm: Convert put_devmap_managed_page_refs() to put_devmap_managed_folio_refs() Date: Wed, 24 Apr 2024 20:19:08 +0100 Message-ID: <20240424191914.361554-4-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-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 767ED18001F X-Stat-Signature: 7onek9gs57y7gwh3837b67j9bwin5ana X-HE-Tag: 1713986366-401315 X-HE-Meta: U2FsdGVkX1+xBqjOJrS8Mtczn7G5B6is3vaJ/7CTIr40UM1VQztTuMNXiJLk0LiYzBBLp2hbw+CdFgQPskiFDaHQXC9MX7ptb50uofpv596p7ki0K4Kb/roD8s5yPsxikTpWDedB8giF73SunGNwxGbSRSvmPqQr3mBQ04KvbchdRkvAm0hBzEDyccpLwQ+rFoJMWChTadauCvZtArPzC6KKZAIW6TmuMG3oBQ0oNccAhhmNZbW+1VVuBGuN7wmFX6OVDUbagw/Si7quAn5CA87oSomlz/GPWlgIu58GB6kaQsYzYr774mQillMel1ii8v5IMUVCepcagaBEY7+owAhK+bvZIvL1xwnocYkflI3SSIM3V2l3P7YM68pkHdfjAMI8TLzr14QsekOarHcQcf8St5W7kSz26+pwN+d8M8KBDe/RJOFoPJ0xIdICMFP4pimO8sIH/1zOFBeX3qYtIK4LXkHSFQYysOiiyQMLoWRJOPp1dw+Z2s9EtQrp2x4F2OhrjAblkfGGlc6Figf7TKmEMFZ00pHat3Hf53jRQGBupMoMpFlD5fjcwvYk5amvsK9VIw0fpgv/EAyX9qnA01M8WZEaSvpjrM3uUDLW+LCVyTYXxCaNjVD7Ls7oQrzkywl+bS5xLobCoI6HVamlw3NLcxwlhZuUZNs8zusOy8UF5H4pjgt/waHlUIpVWgrN5M6C1jVyF0Vs/OLsZpoUyRLhSWNrFp09gBXcWR7BETHS1EOtqd0rfbp7Ouom2eF/uHTJyBoxRbzTxnkLrkygc1kGWQuyO20+UPKzP9yJVNO98jFCLTvyWuIeCOszzEk9pvtp6uYHlb6woEZLbq/OofP8lvJZHM45s6zfV2BxYPjNMPjEKPVWnTkU/SEw0CoQNFSCvzhI4K2/PVamqjabheQ1xP1s2cN5J3l1YL1eyl+r1qSqfd0i3OTgwL/yLzIn40pYwQyihSGe5viFfUK 7f4UQrRW IGU85uwpSf+zT0CEIZyrnd1Huo5cof9uaZR+7EbihREsgO6tztjKUARUsg/S4UT2e4F6bCprZvco44UE02fzsz0cXHyLMedCt/tNYA09/hOu3ez4H0QqrCOsECdJUjYhWRhYknfM1EblhatuQjP7L3fu5bptVUjKjYqIJUzmHSsNqNFOE1lRAq8F07XOTPChldRUpiFt25NgseAvzEzO6gsaMMvdACxru/axm 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: All callers have a folio so we can remove this use of page_ref_sub_return(). Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/mm.h | 12 ++++++------ mm/gup.c | 6 +++--- mm/memremap.c | 10 +++++----- mm/swap.c | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 070a6e2d7222..19d0ec4f43f4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1437,17 +1437,17 @@ vm_fault_t finish_fault(struct vm_fault *vmf); #if defined(CONFIG_ZONE_DEVICE) && defined(CONFIG_FS_DAX) DECLARE_STATIC_KEY_FALSE(devmap_managed_key); -bool __put_devmap_managed_page_refs(struct page *page, int refs); -static inline bool put_devmap_managed_page_refs(struct page *page, int refs) +bool __put_devmap_managed_folio_refs(struct folio *folio, int refs); +static inline bool put_devmap_managed_folio_refs(struct folio *folio, int refs) { if (!static_branch_unlikely(&devmap_managed_key)) return false; - if (!is_zone_device_page(page)) + if (!folio_is_zone_device(folio)) return false; - return __put_devmap_managed_page_refs(page, refs); + return __put_devmap_managed_folio_refs(folio, refs); } #else /* CONFIG_ZONE_DEVICE && CONFIG_FS_DAX */ -static inline bool put_devmap_managed_page_refs(struct page *page, int refs) +static inline bool put_devmap_managed_folio_refs(struct folio *folio, int refs) { return false; } @@ -1571,7 +1571,7 @@ static inline void put_page(struct page *page) * For some devmap managed pages we need to catch refcount transition * from 2 to 1: */ - if (put_devmap_managed_page_refs(&folio->page, 1)) + if (put_devmap_managed_folio_refs(folio, 1)) return; folio_put(folio); } diff --git a/mm/gup.c b/mm/gup.c index b797424f78ef..49376f756936 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -89,7 +89,7 @@ static inline struct folio *try_get_folio(struct page *page, int refs) * belongs to this folio. */ if (unlikely(page_folio(page) != folio)) { - if (!put_devmap_managed_page_refs(&folio->page, refs)) + if (!put_devmap_managed_folio_refs(folio, refs)) folio_put_refs(folio, refs); goto retry; } @@ -156,7 +156,7 @@ struct folio *try_grab_folio(struct page *page, int refs, unsigned int flags) */ if (unlikely((flags & FOLL_LONGTERM) && !folio_is_longterm_pinnable(folio))) { - if (!put_devmap_managed_page_refs(&folio->page, refs)) + if (!put_devmap_managed_folio_refs(folio, refs)) folio_put_refs(folio, refs); return NULL; } @@ -198,7 +198,7 @@ static void gup_put_folio(struct folio *folio, int refs, unsigned int flags) refs *= GUP_PIN_COUNTING_BIAS; } - if (!put_devmap_managed_page_refs(&folio->page, refs)) + if (!put_devmap_managed_folio_refs(folio, refs)) folio_put_refs(folio, refs); } diff --git a/mm/memremap.c b/mm/memremap.c index e1776693e2ea..40d4547ce514 100644 --- a/mm/memremap.c +++ b/mm/memremap.c @@ -512,9 +512,9 @@ void zone_device_page_init(struct page *page) EXPORT_SYMBOL_GPL(zone_device_page_init); #ifdef CONFIG_FS_DAX -bool __put_devmap_managed_page_refs(struct page *page, int refs) +bool __put_devmap_managed_folio_refs(struct folio *folio, int refs) { - if (page->pgmap->type != MEMORY_DEVICE_FS_DAX) + if (folio->page.pgmap->type != MEMORY_DEVICE_FS_DAX) return false; /* @@ -522,9 +522,9 @@ bool __put_devmap_managed_page_refs(struct page *page, int refs) * refcount is 1, then the page is free and the refcount is * stable because nobody holds a reference on the page. */ - if (page_ref_sub_return(page, refs) == 1) - wake_up_var(&page->_refcount); + if (folio_ref_sub_return(folio, refs) == 1) + wake_up_var(&folio->_refcount); return true; } -EXPORT_SYMBOL(__put_devmap_managed_page_refs); +EXPORT_SYMBOL(__put_devmap_managed_folio_refs); #endif /* CONFIG_FS_DAX */ diff --git a/mm/swap.c b/mm/swap.c index f0d478eee292..f29b3018ba3a 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -981,7 +981,7 @@ void folios_put_refs(struct folio_batch *folios, unsigned int *refs) unlock_page_lruvec_irqrestore(lruvec, flags); lruvec = NULL; } - if (put_devmap_managed_page_refs(&folio->page, nr_refs)) + if (put_devmap_managed_folio_refs(folio, nr_refs)) continue; if (folio_ref_sub_and_test(folio, nr_refs)) free_zone_device_folio(folio); From patchwork Wed Apr 24 19:19:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13642426 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 83A86C4345F for ; Wed, 24 Apr 2024 19:19:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DD6786B02D9; Wed, 24 Apr 2024 15:19:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D84CE6B02DA; Wed, 24 Apr 2024 15:19:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C4D608D0028; Wed, 24 Apr 2024 15:19:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id A51D36B02D9 for ; Wed, 24 Apr 2024 15:19:21 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 3A0E514029E for ; Wed, 24 Apr 2024 19:19:21 +0000 (UTC) X-FDA: 82045388922.26.4754149 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf23.hostedemail.com (Postfix) with ESMTP id 842EE140002 for ; Wed, 24 Apr 2024 19:19:18 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=k18wrnpx; dmarc=none; spf=none (imf23.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=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=6JotmCFxZvqDAIu3rW0ykimEt5xPYO9EEuXw9rm221w=; b=SNfl2MfV98Fj8owtSawpJgHpQDTY30WzMAUnx3BSQ3A9a5d+uL/+BVsqvrJLpupBVyAmde aWQfJrQjt+LKNQNbO1AoBRspibeN/K+TWnBKB6teXuNdHNNYl1gJq94xvOU4bZoXjrzIFA jsn9kEUKLKOyU+EZA/vOdBe86WjzZOw= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=k18wrnpx; dmarc=none; spf=none (imf23.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=1713986359; a=rsa-sha256; cv=none; b=qaB0GU4ksYwPms/Lp80oQ3/Dx6U3L5KCxAjGkCYPbiZQsizIk7nkiaPv38DdIu5BwXy4W7 a1rddaU7Cdy4iuQdr7P8k9t7kFSNMsNyZwD8qx5tLX7Xn2I3j2K640uKamKThhLPil69OH 2FlhopAlYtNQ/BhmlUP2WI0oiKljcBA= 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=6JotmCFxZvqDAIu3rW0ykimEt5xPYO9EEuXw9rm221w=; b=k18wrnpxCsmY2RbKNZwvjjmgp9 csVyeodjHLocJc49SsJI+2Nc6Qz+3muYTa5OP1sfSm8pcnfPbk1WllrqynKWf8IF2o4+HQ4ItLPp6 +sM/liW3ClWeYq87Two+c0iodY2A9Om+ZxmOyqXoPj6kJdjc6MSyw6P8lPqAt0kQ5gjtvB4dv8Evv 3j5f1i3z0fdVtTJkb3wpYT5Lax6lykMHMZJqdDJjt04xQ7Ib4bdK2wwXwW1GNqP/0hkOA3lNEHsCe eMYVMxCdlTrHWyeOV4eIgFmCjNW6PvfTEVeSBkpDEVajLTmlfYmB6kIWpAjevhXaIcKXJ5bRhAzET MlHLseIw==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzi9E-00000001W3t-0zUQ; 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 4/7] mm: Remove page_ref_sub_return() Date: Wed, 24 Apr 2024 20:19:09 +0100 Message-ID: <20240424191914.361554-5-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-Rspam-User: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 842EE140002 X-Stat-Signature: u31b4frndo41hx75u789knui777q453h X-HE-Tag: 1713986358-381183 X-HE-Meta: U2FsdGVkX1/P4F3WLhIiPXFv7MlKyyBP1Al1PT5MSG1T2zjK7K59mplW0OcHgwYaI6lbuIsxfOXhJyUbYjM/5qNCTktVx3JMoP/+dqE2NnpUCBv/yauXkIkuuftxg7kRpG71jJVqDjPIfydm9PtJjuOZlUz0BDV3sFGBSqf8pgQSZxm+w3FbTgHAseETa4GeUU/kvCEpmRMdtUqggLfKiKgaJDT5mQrhqC5J28lcZzLTHWk2HZGPRttJsn/W8QEVXU7g08GQB7AXH3h4gI3ZrOg+7cvwi4HSyOAgCW4jJzxEy1SInwOCCEiZHB1qYygu/dPhjqygq/zTMvbAHVYB86Z8SWYtAOAYFWRdk9SqGb30a8UbVIvV1zQU62ECL1eFvwo7s3+zUCrdK9IjvzpBKVaRmLTEZdGc0xvILjY4RQ79lgzWCrjxlUXFA3a7uEUwZ9o9XwiFVqeVCDR54jQJUO/nAEXtDbxWq2UpH8dDXW5pyb2BYqRZPbO/TIzAt6r+l6lJ5VDczHA7qD+0Vq9KXOOt4R4aiLPaCuOU9d/FIhGHmkoH76GWc/+vcoK/EzDezdvVbTye5LjQTqdvuCm935rbQSs3ZHCadWFZx4k8NGzbb4Ag+mYj+f62ltl/qnekV7VuqS2ypjSo0HAMBYJHi2wYVEf0uHiyJ41Il3Ono4rE66KMrXVvnVLxMCrRssGnwxNj6w7QhRAdll0qgYS83PqSRbmKBA6Xmh3Vkv7tTE0ofW9w+1iQdNacL/M7VciCAuBsrqHWtd+AuSPa96OFDbLtoIVuc/IuE875WLFqdGuR0FT0DlyryAglOxLm0Na6h1dYLx6M3KJtx9CLv9r7Y4cMQ4MbbtZzXnBPUtBlBrpSW6C0+vTrPE5pYYu0uVt+oeemSM7/IkqUeyrDEywksKvrQ2jqARJM 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: With all callers converted to folios, we can act directly on folio->_refcount. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/page_ref.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/include/linux/page_ref.h b/include/linux/page_ref.h index d7c2d33baa7f..1acf5bac7f50 100644 --- a/include/linux/page_ref.h +++ b/include/linux/page_ref.h @@ -139,20 +139,15 @@ static inline void folio_ref_sub(struct folio *folio, int nr) page_ref_sub(&folio->page, nr); } -static inline int page_ref_sub_return(struct page *page, int nr) +static inline int folio_ref_sub_return(struct folio *folio, int nr) { - int ret = atomic_sub_return(nr, &page->_refcount); + int ret = atomic_sub_return(nr, &folio->_refcount); if (page_ref_tracepoint_active(page_ref_mod_and_return)) - __page_ref_mod_and_return(page, -nr, ret); + __page_ref_mod_and_return(&folio->page, -nr, ret); return ret; } -static inline int folio_ref_sub_return(struct folio *folio, int nr) -{ - return page_ref_sub_return(&folio->page, nr); -} - static inline void page_ref_inc(struct page *page) { atomic_inc(&page->_refcount); From patchwork Wed Apr 24 19:19:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13642432 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 BB2E4C4345F for ; Wed, 24 Apr 2024 19:19:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CD5276B02E4; Wed, 24 Apr 2024 15:19:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C06066B02E6; Wed, 24 Apr 2024 15:19:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 98E7A6B02E7; Wed, 24 Apr 2024 15:19:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 6C62F6B02E4 for ; Wed, 24 Apr 2024 15:19:28 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 2BDE71A0392 for ; Wed, 24 Apr 2024 19:19:28 +0000 (UTC) X-FDA: 82045389216.07.8DAE281 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf28.hostedemail.com (Postfix) with ESMTP id 84795C0027 for ; Wed, 24 Apr 2024 19:19:26 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=kElKxAay; spf=none (imf28.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=1713986366; 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=tgI9zM0JkPeDD4nYChnEAx4Cne/BbcH1RdD5pnSOOA4=; b=LCjXK678ihHBjUytXfcpaEncRTQ6+J7um0p6ZmESvT3Pe8nTYsEdWRHn/QU5Ol/P/ds/yM HcdYBP86l56Qo8JeHd1fCsx2VbbtHvYg+xhmunrWdlU07j8csKOOCmnqryh6jKom5BMwOF YQH4MBC8LiwmmodbP4a0BRPQvbOkqx8= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=kElKxAay; spf=none (imf28.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=1713986366; a=rsa-sha256; cv=none; b=g6c7yY/8rw2Sbs9F+Us+uaygsxzJUK1xijqM9tdHijAulcqV3LVduHktGF7aekAvvhlNy1 OhE34U8tJzhyu19w4WjUMlLWDrr2XaW9nVnWpu/aMNw509A4Qa5p4SJDWZwXsajsIQJQ7Y 6kuVQh8mbM1PWB1lSw6BGrudtF/o32M= 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=tgI9zM0JkPeDD4nYChnEAx4Cne/BbcH1RdD5pnSOOA4=; b=kElKxAayScXBOhZkoDtgupSZUi gytK2a9XgJphA+2faEzI72JuXm1zdf4z4pku+xvVeECnh6yRolhM+b8BSvSkh+KgUQTsHgGx2G01u pOq8h97Y4oBvBscNGaDzGr9EuSMmBM2ba5Td6KnXiAWdm0n8OcGBu3ILbZr2gUIhB45jVoKZs4kNI D4Ml/LVZL7qH59+tEKaoi0R5DiSaTPEDoZdwZQPcqNDAX23m24u3ZUY7Kxid6egekZzqvvsNgN2AY 5bchRr0BpuDbRujWeDs1Q375C5BVRe73scIZOOQOpAuzek27nyrNsiI52fYqiwdwtfFJDiqnZZigm 1HZKmapw==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzi9E-00000001W3v-1Ixi; 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 5/7] gup: Use folios for gup_devmap Date: Wed, 24 Apr 2024 20:19:10 +0100 Message-ID: <20240424191914.361554-6-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-Rspamd-Queue-Id: 84795C0027 X-Stat-Signature: ssnk6it81hmrebjtdw7t3f1ni5pmzqnf X-Rspam-User: X-Rspamd-Server: rspam07 X-HE-Tag: 1713986366-701432 X-HE-Meta: U2FsdGVkX1/SbbYouo2q/XCnb9yhopPQBlVexNCy6vGW1vy4+XEIzYtTQJH6Ac+ckYG2YGOE2z/usTPqV0sQrYF45sJszd+1ozRINhBPeeugvWzOpB+X4qHJbFseoQxKhWMROWqtgOwcmb6cgFJ9cPUbbADSHjIQyxPTS859oK4kp5oUty4I1uvWZhD345R0aiAYZOCM7gEGzvLPueOEkOe1MxK82THLZa18pKWMfD2E3yoWLOv6GZg9jVMkEjUYdN362l8ve07YSl319o0h78XeXLc4mEDY3LzXMKGJ2eQiCIPXA5l+gF17hcLyGU3a6fTdYTlUqtovu0T+tg+P6hKVPVin/vQEMBXSswNMtaOJxXUtOPdpeCVpDozjUQza1iNFiA9pFNqBCpyYLBU+2u9AugY6ZTlNS18SYOJC+xJCUn2ZiUiOmiGNN2knDUqqdGYmymuew93DAmb4H/WOjEtkX4kLsC+fQTwqGsxgqNyFVbX9k2B/uOMd9E62Ex/+uBS7PZz93x/pKTkSxVv3W4dDbgwqoffTI35VNCaS++gfC+f4LiNdlr+uOjAlP2u8kLuIaFaQ35L03y5uHMFHzlX25OFvKNVA66qq8fat0d2UtKulBEvtSJ9LhdksPx1HncHPqO8dk1SzDE+kWlNFW4OQgHha+sXYZv0ah+3jHEQIjlGQguEagKQt8niibP9nBv9DqDTdumT1WFRQfOiy+c3uiCZeyusO6JBJOg5RuylpWKe2FoepuXopZvti9xHtC9qyks15hNizg9TR/ltCb6gySnaaGidXJwJX9+BWCzu7gDrWfTvK1tEX6bLVx5BEEG6v+fzHvTNrQfvPjdCXGNCIM4Jona73Nyxn2M5M9hZ2KyQZQD9zemHAryaZw60L2nF++gZz9ZLIzkWDvbGvUDJXp3C5DzRR9aNARVMdRt2Uy1qdeB9pHzmmjssj8X03evTufX3xDb8jt2+wx/Z 00eIy43h SgKl4Xc4x444iJQ4MP1wdfwf2QZnSjrHVO+FuiOjULCagtuSndJ1ubpp5GBlXd05cYWondI6KEuxsYUOd4uEzrMj7KHdD0RRve80yvRUcxdQOAvCe36+RKPnPGS9kroxbQ1LjcIGtNcw/b4VH5EpXy8mtg4Xu9eANVL+HjijqmplUeprrCUyWQoO4YqKeKDcCcIkp24YwNTiQdrhu4Bz+J1oqE7KUZuxukKyn 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: Use try_grab_folio() instead of try_grab_page() so we get the folio back that we calculated, and then use folio_set_referenced() instead of SetPageReferenced(). Correspondingly, use gup_put_folio() to put any unneeded references. Signed-off-by: Matthew Wilcox (Oracle) --- mm/gup.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index 49376f756936..e4cc12b8e985 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -2877,13 +2877,10 @@ static void __maybe_unused gup_fast_undo_dev_pagemap(int *nr, int nr_start, unsigned int flags, struct page **pages) { while ((*nr) - nr_start) { - struct page *page = pages[--(*nr)]; + struct folio *folio = page_folio(pages[--(*nr)]); - ClearPageReferenced(page); - if (flags & FOLL_PIN) - unpin_user_page(page); - else - put_page(page); + folio_clear_referenced(folio); + gup_put_folio(folio, 1, flags); } } @@ -3024,6 +3021,7 @@ static int gup_fast_devmap_leaf(unsigned long pfn, unsigned long addr, struct dev_pagemap *pgmap = NULL; do { + struct folio *folio; struct page *page = pfn_to_page(pfn); pgmap = get_dev_pagemap(pfn, pgmap); @@ -3037,12 +3035,13 @@ static int gup_fast_devmap_leaf(unsigned long pfn, unsigned long addr, break; } - SetPageReferenced(page); - pages[*nr] = page; - if (unlikely(try_grab_page(page, flags))) { + folio = try_grab_folio(page, 1, flags); + if (!folio) { gup_fast_undo_dev_pagemap(nr, nr_start, flags, pages); break; } + folio_set_referenced(folio); + pages[*nr] = page; (*nr)++; pfn++; } while (addr += PAGE_SIZE, addr != end); 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) { From patchwork Wed Apr 24 19:19:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13642427 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 D5B38C10F15 for ; Wed, 24 Apr 2024 19:19:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 10E3E6B02DA; Wed, 24 Apr 2024 15:19:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 08D206B02DE; Wed, 24 Apr 2024 15:19:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CE90D6B02DB; Wed, 24 Apr 2024 15:19:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id A60416B02DA for ; Wed, 24 Apr 2024 15:19:21 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 2CBED1C172D for ; Wed, 24 Apr 2024 19:19:21 +0000 (UTC) X-FDA: 82045388922.05.B46BD9E Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf30.hostedemail.com (Postfix) with ESMTP id 9DB6E80014 for ; Wed, 24 Apr 2024 19:19:19 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=tSYwaar8; spf=none (imf30.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=p3lqptE//SO16fO39hXeAhAlb0Fx81Y9AsbdqlndqnK1593TYtZcAJ7YfKXhdsFH34d9MZ gYFDNeZVpX4ukYxfXPGBGf1tQuSGOfDX5fXUTNg6eyvh8+r20qyr9GolKuZutb/f8183c6 Ft2B8ONNZ8kKY7qFQc/1bynMwSE8/Eg= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=tSYwaar8; spf=none (imf30.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=gmTH3Fi36B1FtG14ryMNsKgo6H53VlRo4oF/V7B2VCA=; b=FAywlv1J6OA2FH5AVVUQXzw49lkMb85gbmzqN6eJrx5HvfXnytGq/2MePFpfSNuYDGLjnx ein19tOkHA7zcycGHyJYGQbsRnD+r6yKziIEUAeouN2nFmU193j2gLE59r7u8AcNvaPhpE uuKT1Bo6DwNpQolDcrKsevSt/35AEGs= 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=gmTH3Fi36B1FtG14ryMNsKgo6H53VlRo4oF/V7B2VCA=; b=tSYwaar8lchw51FjK6uDty5uJ9 zClZ8QbL3OHQ1lQnLeUIJa6efFzfxxa4kprmpP6xESaIyHzxvrUJJ1zmPvd9SD0B1aw3V5WL73pzb vf9iiPcP9kG3Q0m6NNDUJI8lRxryfw2dU8EEU4b/3tl+rfWoeN//mbEnAcGVafpBb+HTfrq9oE46/ j1siP5X8XttCRO1Eu2iRT4l2IKVFQ8SXkFrXYAoxKNIYUiXrXhyVQrrN7Xn6uL6huTcuLvMaJ1b8g CMi9BXf6HEgruL1pQBtQ7BdBSjH1rMBM1dqz+XVEZVUQOVObxumz3bPjc7B8CWMJU/CkmJHTzLIUB xrgvWopQ==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzi9E-00000001W48-20mW; 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 7/7] mm: Remove PageReferenced Date: Wed, 24 Apr 2024 20:19:12 +0100 Message-ID: <20240424191914.361554-8-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-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 9DB6E80014 X-Stat-Signature: pe789eusft474y696ne1r8cw17yx6nrw X-Rspam-User: X-HE-Tag: 1713986359-978316 X-HE-Meta: U2FsdGVkX1/V0KDCMD5sFROdT8KMnFy8nUUZlyod62EkgQQKrufJI9pekxi7CNPn7FsmXBU9TAJ9gxaUYXFMm/DKACyKU/EThem9Jvy9lok6rUP/mPcersNRmbB/xleeUBAKuoGjjSr8EvHJ2pSeWQofRFds1Q+KfI39vokS8QK1gvo4AVgqnTlrTuWTtPz1+j9jqU6QzgelGM3Y3p+OuZblcVVt+YoenwEmGzWmu+HpaF+4kP1pLNP/WPvpAYEC3EhmybM177vy4kN7T7GjHtt1r6bnrw6vYVMLvlmohHqoi5wi+Ny58AOkjiPWl5Vix0pOyqZPCdIYY58e6+LNn1Y8MucZpssO9NbegdVT43XX6jyHMzjF0ZrixyitjqIishXi5acw5F8kJDltrZxoH+0qjkACnTqGpPeyXD27hyktw8N72eG0OgSILUYFysd72UXBJrAmSkGhqeSPUti6kEjE8sj3ReV+uGDXOs/uohldHMvVyh7887xoIIhz9QJHYiZoMm4lQotI4KJVnNDpX7Vna3tjuLyxSltqYV7SWgS1HEnIWAnHScEesyq46WGNYd0WzwYVXI5Cz0DVj6ZtzNXarPHngGnmQV0Y6sey2UTsajpperEELlqReUEgmNnNmcHoHUSSqKCAcLK9AG0KXDm7+taxgB0YmFsfrZoauJVnKGOiy//AMgtJ4hRRA039ZhxVVVLPjL8luMqt8YwR1YOIkx0TBqCLioY2cQ00+UJaYJhfIFqscxN3KL126m+16hh1Vg80QmbuiKp+4jgouHvcIuu23sGZagxFlDV0QZjU9LkVzoN4YyWWnELk7EEjYi8/dEFWhZnzpK9DPiYzborJKqv8pad3JjzMtrBG8aP1yUe2qWiY7A== 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: All callers now use folio_*_referenced() so we can remove the PageReferenced family of functions. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/page-flags.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 5a5f84d75f31..c79f78d0ab72 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -508,9 +508,9 @@ static inline int TestClearPage##uname(struct page *page) { return 0; } __PAGEFLAG(Locked, locked, PF_NO_TAIL) FOLIO_FLAG(waiters, FOLIO_HEAD_PAGE) -PAGEFLAG(Referenced, referenced, PF_HEAD) - TESTCLEARFLAG(Referenced, referenced, PF_HEAD) - __SETPAGEFLAG(Referenced, referenced, PF_HEAD) +FOLIO_FLAG(referenced, FOLIO_HEAD_PAGE) + FOLIO_TEST_CLEAR_FLAG(referenced, FOLIO_HEAD_PAGE) + __FOLIO_SET_FLAG(referenced, FOLIO_HEAD_PAGE) PAGEFLAG(Dirty, dirty, PF_HEAD) TESTSCFLAG(Dirty, dirty, PF_HEAD) __CLEARPAGEFLAG(Dirty, dirty, PF_HEAD) PAGEFLAG(LRU, lru, PF_HEAD) __CLEARPAGEFLAG(LRU, lru, PF_HEAD)