From patchwork Tue Feb 27 19:23:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthew Wilcox (Oracle)" X-Patchwork-Id: 13574334 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 7F718C5478C for ; Tue, 27 Feb 2024 19:24:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 18AD96B0117; Tue, 27 Feb 2024 14:23:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 112AA6B0118; Tue, 27 Feb 2024 14:23:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EA8676B0119; Tue, 27 Feb 2024 14:23:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id D59376B0117 for ; Tue, 27 Feb 2024 14:23:47 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id B370B1A0B78 for ; Tue, 27 Feb 2024 19:23:47 +0000 (UTC) X-FDA: 81838558494.06.B219BB9 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf07.hostedemail.com (Postfix) with ESMTP id 4FB4540003 for ; Tue, 27 Feb 2024 19:23:45 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=b0CUiTiA; dmarc=none; spf=none (imf07.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=1709061826; 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=uXWWIyp7K/HgoFyXnX0l2Co46veb5iiLEnhEjPfsu+o=; b=UjSZFBaC0/fRt+WzsxHJuwDtejto9U8AuSVpIMJKOJveptRTfiQbldxZVi04DRWjy9Wvo2 Il+NsC0jC4ckUMB0njpTiu+EXkSHmyG2g2B9SsbDaR86OYc+wzaCqf0tP7TJPcqg9PXJUe uwACwbrYfHP4TzStEF45/vZbi/otANM= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=b0CUiTiA; dmarc=none; spf=none (imf07.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=1709061826; a=rsa-sha256; cv=none; b=ujkVnwv0vdy+JPVaoG03UMfIpW44ekwBt9pMnkkrI4dOT4LW2/w4nG1/5KdbSCcLbb4UrW IHfZQNOVHRm4VO9xnomabAxDJr/b1rBNEx/CFCK5CSMCdL14rMc8JDOtN+DckMA0LSHDex QUymKxYs7Wj1UjV6UWgJuibffuQSOD4= 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=uXWWIyp7K/HgoFyXnX0l2Co46veb5iiLEnhEjPfsu+o=; b=b0CUiTiAxshFgblwyb3Ah2Pjs0 8ACCeYk+/UrVFv/tUzjZ+S9cCboTkVdFScb3bJ89YwLfFcmGXXy0DRgF2K6e8RDnsTZCv857ye1qc pL+sJ9Y0DdzUktHDUkl8rXTbraNBlvRplt+FrRK18KYd4+2mFKCPEHYcNJ/jFVBA8bVkZwuycja73 cFDTvkUROfD9/TS34KhwC3ez/+3GTnBIxjSkRX4Xpp72F2Nf9vIrsm3jlJX8b7b5Q9wxRTNzoiAPK yk0l4HCPgr4Jdq0+rcLiOEVJW/KZ8Kqen+h/gk3boR7f5Tca3fj02h/WXz641FXhZ52l8Z9p+L2XO 8GIPjHQg==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rf33D-00000003B10-03tQ; Tue, 27 Feb 2024 19:23:39 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Subject: [PATCH 2/8] mm: Remove PageWaiters, PageSetWaiters and PageClearWaiters Date: Tue, 27 Feb 2024 19:23:29 +0000 Message-ID: <20240227192337.757313-3-willy@infradead.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240227192337.757313-1-willy@infradead.org> References: <20240227192337.757313-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4FB4540003 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: a7tcss4qw5wkfh5jh8euu6fm5o5gphwg X-HE-Tag: 1709061825-164548 X-HE-Meta: U2FsdGVkX19Yg1X34tvd4ia5c95Sw4L31V57CS0zSQCK9SJ/1lNQfw4ZTXT2q64Yx/uuuKEsuuTL2SkgfULpUO+cDv+SpeLzg53y12bI2/nnGn8CJGOMYIJVklzOVqdqEYi69PRJR6CxXV+U8br6fOBrMmZWM88UHc58iQG8tAQNgLsy7MKjoZ47FjHHXult3g39dBX6iP1hjtzGB8XxLfYHVMHep8UujAygLew6CjHn+w3zKoI0Sw8GTocvhXxNnJg5d2LFjstwlrbrLvmiVEStvQITTy1UA5FiV2Y7XBGsnH3HRXGjbpVfdpakDkd9ndjTydIaCGfUA9z6hYz2kB3N4NUi7O1pSAg25Kyauno7h49oiSSCnGolSdiqDjIMMcdhkjxfyhF/n95oGjhDI9ADdPKxkx91XwJGiHo3TVqALRywKo5oJ8ON8SqutTbZSau+y48Uf1hBfodixKswzhDdigSlQ68S82F8t7Nxp3oW6RiTGfV3XB0hWoqaI6xmWP2YJXwAc0aFyHW2KTk4Jervk9eg/IMNiWbd5ANfe8fbkaoJSY0t/Af+MlvPQFH0ADmI3yMfWk6mknTuZg9n6guAVqfJi0T9zryWHXPW/Y34GAX3QzTAgctvJCqiRbiOvTBwZwqDknSD2GxBR6kya0PfJ0qz68kb4BoTMDqKx0h5BGNFgay+uryJXROROVZCMvIuhBJ9auOzwpM4Ltnp54YDReote6ZI13QT7miysqKJryySJBrhAmxGaWh2NpCumM5fyrbud8b8ObiaPKoPcf1auq2dEWXn7jpWAzFubteLE7UPb5QuNOEm0Ib+gYpqpsOq+vxgy5QrG4yrZAMAk6PMyut7dgOLirvVL8fMmgk0WEeu5taexQ== 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 been converted to use folios. This was the only user of PF_ONLY_HEAD, so remove that too. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand --- include/linux/page-flags.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 95ab75d0b39c..d8f5127ae72e 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -328,9 +328,6 @@ static unsigned long *folio_flags(struct folio *folio, unsigned n) * for compound page all operations related to the page flag applied to * head page. * - * PF_ONLY_HEAD: - * for compound page, callers only ever operate on the head page. - * * PF_NO_TAIL: * modifications of the page flag must be done on small or head pages, * checks can be done on tail pages too. @@ -346,9 +343,6 @@ static unsigned long *folio_flags(struct folio *folio, unsigned n) page; }) #define PF_ANY(page, enforce) PF_POISONED_CHECK(page) #define PF_HEAD(page, enforce) PF_POISONED_CHECK(compound_head(page)) -#define PF_ONLY_HEAD(page, enforce) ({ \ - VM_BUG_ON_PGFLAGS(PageTail(page), page); \ - PF_POISONED_CHECK(page); }) #define PF_NO_TAIL(page, enforce) ({ \ VM_BUG_ON_PGFLAGS(enforce && PageTail(page), page); \ PF_POISONED_CHECK(compound_head(page)); }) @@ -362,7 +356,6 @@ static unsigned long *folio_flags(struct folio *folio, unsigned n) /* Which page is the flag stored in */ #define FOLIO_PF_ANY 0 #define FOLIO_PF_HEAD 0 -#define FOLIO_PF_ONLY_HEAD 0 #define FOLIO_PF_NO_TAIL 0 #define FOLIO_PF_NO_COMPOUND 0 #define FOLIO_PF_SECOND 1 @@ -488,7 +481,7 @@ static inline int TestClearPage##uname(struct page *page) { return 0; } TESTSETFLAG_FALSE(uname, lname) TESTCLEARFLAG_FALSE(uname, lname) __PAGEFLAG(Locked, locked, PF_NO_TAIL) -PAGEFLAG(Waiters, waiters, PF_ONLY_HEAD) +FOLIO_FLAG(waiters, FOLIO_HEAD_PAGE) PAGEFLAG(Error, error, PF_NO_TAIL) TESTCLEARFLAG(Error, error, PF_NO_TAIL) PAGEFLAG(Referenced, referenced, PF_HEAD) TESTCLEARFLAG(Referenced, referenced, PF_HEAD) @@ -1138,7 +1131,6 @@ static inline bool folio_has_private(struct folio *folio) #undef PF_ANY #undef PF_HEAD -#undef PF_ONLY_HEAD #undef PF_NO_TAIL #undef PF_NO_COMPOUND #undef PF_SECOND