From patchwork Fri Jun 21 05:46:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: alexs@kernel.org X-Patchwork-Id: 13706860 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 180EDC27C4F for ; Fri, 21 Jun 2024 05:42:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B3CB68D012F; Fri, 21 Jun 2024 01:42:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AC5F98D012C; Fri, 21 Jun 2024 01:42:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 807758D012F; Fri, 21 Jun 2024 01:42:25 -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 5ADE88D012C for ; Fri, 21 Jun 2024 01:42:25 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id D18D51C1811 for ; Fri, 21 Jun 2024 05:42:24 +0000 (UTC) X-FDA: 82253800608.10.61F8E10 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf08.hostedemail.com (Postfix) with ESMTP id CCD9A16000D for ; Fri, 21 Jun 2024 05:42:22 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=W0DztK0m; spf=pass (imf08.hostedemail.com: domain of alexs@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=alexs@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718948538; 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=xpikopE4PcJ48VOowmCsdXL4fCoE5+HS1TgM50UOyZU=; b=cIw9re2P4jjOj5aL+hRdwFGIhL5LSkybPw3YbPg8G1aisl0AutzRb0E7rySrOmXWz3hGpo KIy7uwVfL2EA0MHz76jPSxWeL6U5afGZXGUfAQJTPT0ux6t3NB+gWiWwPkTlhDI9P4gDdn OMdOcRnXabr2H10Ej77NylEby/s2VWc= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=W0DztK0m; spf=pass (imf08.hostedemail.com: domain of alexs@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=alexs@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718948538; a=rsa-sha256; cv=none; b=qCoj3gBLUqoci1OYv2XNbdYkeNlpI7Jf50iOTyerm9/In8eFU+YbuTloIQthUJttmHmCd7 Q7xznxzrhUN2YpunJHqy9DwqtxRFF4+5b3apkzcoCczkqnIOvOto7LZb8DmrBVJnF3KAJX QBVfVFqiX6qv79QmH/3eUMgQ/UIVzrU= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 1EAB6CE2B65; Fri, 21 Jun 2024 05:42:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42E17C4AF0C; Fri, 21 Jun 2024 05:42:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718948539; bh=7oNANOKMLtbJmXb9loH6eu8JvLufwYd8JIWVLHAnqL4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W0DztK0mpdQ9nkPkrX3G1oWV0jN9zXYYkkUwaQaFTDd67I4LtFfWlibpmLHOlupgI fhD0/PVR2FYJypn+aJNV4ow0mh2vjIkqlRg422SSynLyEIcXd0OlZaduQT3rZspgXd 3E1i0RdBtY85TaTN9qr53ckrhhhujmCzCJl1xwVpx8oSDk2TjMhMOUT2c/X6Q3eB8S mlEJ0J7m5GK2sYQysRObCsWJ9mVN4J9eOmtHjMliJCIAxwyjjZpyo8sdQmxwapATuH 8ZJe6SmS/Ggk9WqVdazQppwtz7I8E37R//PDGAQjg8ANUSTaA88AaDMcKKB/cz01b0 /QVqN8dKtEuRA== From: alexs@kernel.org To: Vitaly Wool , Miaohe Lin , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, minchan@kernel.org, willy@infradead.org, senozhatsky@chromium.org, david@redhat.com, 42.hyeyoo@gmail.com Cc: Alex Shi Subject: [PATCH 05/15] mm/z3fold: use zpdesc in init_z3fold_page Date: Fri, 21 Jun 2024 13:46:45 +0800 Message-ID: <20240621054658.1220796-6-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240621054658.1220796-1-alexs@kernel.org> References: <20240621054658.1220796-1-alexs@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: CCD9A16000D X-Stat-Signature: 9ntet9gf1uuzb6w3mxy9y8atc9t1e8g5 X-HE-Tag: 1718948542-387307 X-HE-Meta: U2FsdGVkX1999Kl4EUgx83uR/tjgEvGvOryTC5RWv1SQ+1oHEKf6UUQFSCXv5tpvdYPheRb/ub3MJv6a35seKCinolml9Ennjkm+y8TG94T7G9eWg3YBYbpsOa3FVnY/2lGidNc/1v3P0lChl6FTfw/u4uOzsBhuOh6qBOLsUv4uZ9MtSLWrg4Q4EdN8birm7yX62xnSwh4OIjYbPkWBAdJe+Sfn5W0HknXQ0tpNf43Cp8hApBpckieyINPRJG283+DC7P0yW1Y3RXncYYQMGeQqsOyQe3+WpsX1VQBKRFAn5wS48hQr39dmL85tCZqAgABaHQfzNIi/zHntf0gIBuexnQdirJ2Ejoyx47Ugox42wWKv9QpAbtxgteakE0b5/diSW0sbE9rTrab9hsbbOXq7e9WaKqIW4nqADI+oysxOOdkcWDCDJQ2rkbIXi+XlcTsbVUs1sZsD16B725m8OjnegqnuAHTZtJUz932aKWYOlqNAhpbXwg8pUogWc/j81mamkVDRxTl6WcTvp3G0T3n8eGyti3jxpWOyXwGF51wfZg6Mpb43t/0AbT+lBCcdlVygSYLQvCdmj808dumZlVG1kBHBsXTmsiy0WJoRfp0lqAamoDWyhO5Yidqx/AsVHDgQlLzF7uArKLZwcHYIFpjrq0S40GYKMmIhonLOdpCn3NjYV2tJZXzoi2HZzeWMJYOqu5o3Qf4OugANhMtUkYyk1Sbo8ZJ9h87+bax4fs5i88JLe+oClcQr6yyk9L44HU0BNFu9pCDqmltvLqODrvUBnxdfXu6RMvR7QDXdvN0sm58H/lir5KlWfo7i3icezWLG11zoVCy8elGaEfXoHvtO55J3bCltVf2ZIENsLRLOaa0AvohUDoSzNXK5SMF9AyHcFfpZCrOkx3yZisTuUpUi2SHRVXUu6Wab5KwFC5JsyJ7kr0QtWttsn2q+szB4BCE4Q9jPzn7PhYszMe5 i8Gz2c3V 5HGItYW5Tv77OJ1QfRQSfR1meDjCTE+Frjd32CsaY/dvwh08EtR9kQo6H0c3GJmqW+Tsd0HGrFPMCfbtdV8Pgc21FYGYv06f4wpKJcKR9tyrvNH34PwdWy0gOeNwpmckiH0U8EpM2nI4rngf3hdqXKEr8YBAMchto77UfLDQbwE0inNWkpt/dOf/uJ1bOFJmHe8F2K32HPeN29QpYHWavu39VRLMIewelreyA2EMhJLVgvfkwJJsTmT1AO4YHZT4nI61wDuYuGVizNG34haVoNXj4N7gz5WRw7vCqXCDwpdLwmm6G0v6qioieyOUsW01NglIyAajpHMnS+P021e91Oy289TqIEz99iU5j 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: From: Alex Shi The func only uses page.private member, now use zpdesc.zppage_flag to replace it. Signed-off-by: Alex Shi --- mm/z3fold.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/mm/z3fold.c b/mm/z3fold.c index bfbc9f9fdfd4..cd1332243c62 100644 --- a/mm/z3fold.c +++ b/mm/z3fold.c @@ -320,15 +320,16 @@ static inline void free_handle(unsigned long handle, struct z3fold_header *zhdr) static struct z3fold_header *init_z3fold_page(struct page *page, bool headless, struct z3fold_pool *pool, gfp_t gfp) { - struct z3fold_header *zhdr = page_address(page); + struct zpdesc *zpdesc = page_zpdesc(page); + struct z3fold_header *zhdr = zpdesc_address(zpdesc); struct z3fold_buddy_slots *slots; - clear_bit(PAGE_HEADLESS, &page->private); - clear_bit(MIDDLE_CHUNK_MAPPED, &page->private); - clear_bit(NEEDS_COMPACTING, &page->private); - clear_bit(PAGE_STALE, &page->private); - clear_bit(PAGE_CLAIMED, &page->private); - clear_bit(PAGE_MIGRATED, &page->private); + clear_bit(PAGE_HEADLESS, &zpdesc->zppage_flag); + clear_bit(MIDDLE_CHUNK_MAPPED, &zpdesc->zppage_flag); + clear_bit(NEEDS_COMPACTING, &zpdesc->zppage_flag); + clear_bit(PAGE_STALE, &zpdesc->zppage_flag); + clear_bit(PAGE_CLAIMED, &zpdesc->zppage_flag); + clear_bit(PAGE_MIGRATED, &zpdesc->zppage_flag); if (headless) return zhdr;