From patchwork Fri Jun 21 05:46:47 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: 13706862 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 CA5CAC2BA1A for ; Fri, 21 Jun 2024 05:42:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DB0C38D0131; Fri, 21 Jun 2024 01:42:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BD81C8D012C; Fri, 21 Jun 2024 01:42:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 91D568D0131; Fri, 21 Jun 2024 01:42:31 -0400 (EDT) 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 5F9D68D012C for ; Fri, 21 Jun 2024 01:42:31 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id D1E944090F for ; Fri, 21 Jun 2024 05:42:30 +0000 (UTC) X-FDA: 82253800860.23.60C2702 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf25.hostedemail.com (Postfix) with ESMTP id CF287A0006 for ; Fri, 21 Jun 2024 05:42:28 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=pMsgGw2f; spf=pass (imf25.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=1718948539; 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=jfC+rNNm8OlE9BZhnAxVsMusbTuN3XVQRXD4e/x4TVY=; b=8UMP144Ftrs48n71FMVnlsa5vPRyh7fWKzXqYiiB23TByyUgs/3BiM2m00H4AE98Pmdru1 UbR5IRuwhMXXXD31d2YuihSX8RXg7d/Hdg1FCX5Qpfhzz03tnHFykLzyfnriyrSQsx4PKL P7VZhYUZqisQymq21NRssM7L6JIhfeg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718948539; a=rsa-sha256; cv=none; b=cjxavwGLZrDKCp3ocPRsTEJ7AlcF47Q7xqw9Y+wCDueLZCMo0nuR2LhDF5fOWvjntCyA5m C3kIQF63HKYpVBkehN5FAPMQDNAdosZLmYRGrNQ2B47SEctki8pztSIWDIIZix/1skx8ci PVU1I3iyKpW76rESnJX2NM1S56n/hjw= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=pMsgGw2f; spf=pass (imf25.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 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 329B5CE2B5D; Fri, 21 Jun 2024 05:42:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C3E8C4AF09; Fri, 21 Jun 2024 05:42:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718948545; bh=HH8XUbwE54a8Ffun41cCB2IdbyAXONYKrrqycjR2+TA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pMsgGw2faeC2vry7ZfObRdqPniifc1PywteXa6fKyQZYs70YWl/TsVQxmuZoesIEw TaQze64JKDMRSAWcfynF7PkpSTcd/3wsLqNQTQhm2t1EJ5Vd2V0qb3z9oXhnvIGpUn 5QCBfWdYoIGz7WXdJ58DpOID9+bOjQ6yL+C84N7J6ri+uSjnhEwxGAgZCh0n0PyOw+ zT8S+Xy5If/MnxW9+63qKKT6ypsQe+hmbyJgImhAjzy4nrmUrjCUUjodTol/lVTA6i cZupBvuMYNV6/g/N+p4Nhd2AkuPrgu2adPHto/Tma6Up2WQS+tMICgF44Z+INGUrEE 15rT8lv4wMCBQ== 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 07/15] mm/z3fold: convert page to zpdesc in __release_z3fold_page Date: Fri, 21 Jun 2024 13:46:47 +0800 Message-ID: <20240621054658.1220796-8-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-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: CF287A0006 X-Stat-Signature: mqdznbpbm5btwfxwxxfqn9azb857uk86 X-HE-Tag: 1718948548-646173 X-HE-Meta: U2FsdGVkX19zxJ3Mf8L6ZgFyorahuG5giHrEJbioCt5o2bXBQdiImK4pDYAGOD1uLPKIgTQRd8joBNSvIHWWpvAN4QWYIq+qMxF0WSNKtqtI5pXzLOOjZwdaidaVJWhhsg6h8IEJVc7cuF/ZzHCOzBQPawj/KMiJscnUmZhRqcOcyUIkrAO/bt0KoKAt4PCH3PTxcg3i6AY5Rs8CY2V5srjELB6NLMzdPUhG2Az5tcI4CNmPdRWXBfC5UiRx2R+cf+I7JziPXw+3Fz8FVRgg2GclU8+fAECUT6hWXdJttP3X6npz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, 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 main purpose is converting page->private to zpdesc->zppage_flag. Signed-off-by: Alex Shi --- mm/z3fold.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/z3fold.c b/mm/z3fold.c index c3c740b42052..afdf21024f83 100644 --- a/mm/z3fold.c +++ b/mm/z3fold.c @@ -441,12 +441,12 @@ static inline struct z3fold_pool *zhdr_to_pool(struct z3fold_header *zhdr) static void __release_z3fold_page(struct z3fold_header *zhdr, bool locked) { - struct page *page = virt_to_page(zhdr); + struct zpdesc *zpdesc = page_zpdesc(virt_to_page(zhdr)); struct z3fold_pool *pool = zhdr_to_pool(zhdr); WARN_ON(!list_empty(&zhdr->buddy)); - set_bit(PAGE_STALE, &page->private); - clear_bit(NEEDS_COMPACTING, &page->private); + set_bit(PAGE_STALE, &zpdesc->zppage_flag); + clear_bit(NEEDS_COMPACTING, &zpdesc->zppage_flag); spin_lock(&pool->lock); spin_unlock(&pool->lock);