Message ID | 20240621054658.1220796-9-alexs@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 E5DFAC27C4F for <linux-mm@archiver.kernel.org>; Fri, 21 Jun 2024 05:42:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B3DA78D0132; Fri, 21 Jun 2024 01:42:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AC7F88D012C; Fri, 21 Jun 2024 01:42:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8F16F8D0132; Fri, 21 Jun 2024 01:42:34 -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 695EB8D012C for <linux-mm@kvack.org>; Fri, 21 Jun 2024 01:42:34 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id CD747C0891 for <linux-mm@kvack.org>; Fri, 21 Jun 2024 05:42:33 +0000 (UTC) X-FDA: 82253800986.26.9A48F2E Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf01.hostedemail.com (Postfix) with ESMTP id BB72F40014 for <linux-mm@kvack.org>; Fri, 21 Jun 2024 05:42:31 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=czXMYM0b; spf=pass (imf01.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=1718948547; 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=28J1djLihcUXy4fswcJMnI0rhfSho4qEJW1HrBqLWcA=; b=bx8hBzRb7jAzOftog+C2SZ2rsF6LYoZBzE2C5xZTsRkhdY6omwHDYp191f695DwOXhNi5i qkEV2tmyogAwdxXQkivQO2X/fXe4vriB+AHdgmeAWM6CAPYp1Yym2KixnGqPDlwZfqujxn 0WQQSnbGOdZ0TvgsZXXttkXl0HWXTWE= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=czXMYM0b; spf=pass (imf01.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=1718948547; a=rsa-sha256; cv=none; b=8X9Xgcn2N64MZr9kQzITlT7YKw69YH5RPoNMN2zPkKcdrC7TUp3mEZTjfmHGPPYpcrlVCK lZED0MxSF470CxHivuFNZiz3w1XQkPBOgpUOzeILF4y+oCpnheByDhpAXk15T8/mTGnusI Ak6jvT2PxhVA9cYW2j7grVhBDR9DM9w= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 2BFBBCE2B5B; Fri, 21 Jun 2024 05:42:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 745EDC2BBFC; Fri, 21 Jun 2024 05:42:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718948548; bh=i+6jvijEvKznYbydl9yTcQyvtnhbHNyQpu93+PKwok0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=czXMYM0bXh8jZ8xftE+0j1b7rkSL/jCrtw8ckNbHOZmFLB7ysjWJPl9eILFV6RiCa ajtcXwIb12ZQn7bD+gnfFGeceJkDl10HMKqJzwtZZL4O8OMOIaeY3jdEaHqwbtjUpr SvQrsXs6MAxl0on05DNGeHGaIr8bj2CwOHFmZC1A18rOD/+mipzobyJ6T5Bdccpi8S 5NpmdOV4Lmf8teIpRLA9Siiu/VXDGNVCUsFKEx3ZokuJIq6o+P4FuuRn/6ZtdGwHgs VgaY11vZfsiMnM9acjeemBSsxFoFDT9cd1v+/atG/tK28kDz64lYZmxxdlFoHXY+Es vb6yS7x9hDVdw== From: alexs@kernel.org To: Vitaly Wool <vitaly.wool@konsulko.com>, Miaohe Lin <linmiaohe@huawei.com>, Andrew Morton <akpm@linux-foundation.org>, 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 <alexs@kernel.org> Subject: [PATCH 08/15] mm/z3fold: use zpdesc free_pages_work Date: Fri, 21 Jun 2024 13:46:48 +0800 Message-ID: <20240621054658.1220796-9-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 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: BB72F40014 X-Stat-Signature: a6mrk77iwnj7dc1hszbjesjynghs5ybx X-HE-Tag: 1718948551-428767 X-HE-Meta: U2FsdGVkX1/Lk8FGQoaM2/2PTHSphI/PjN2uVE9pOjSpwYOYxb9JaM+KdjKn/o/W49v9iOe2cmO0rAxo2CfdyUYFftGwTQrckcvZ2pE9eBzMd+bDkx8BaQoDv7/W9nw9C/8htrPlK5ZCTZXuGXyEiWkxui7x1pLLYd/dlGwMiFDY0T+uZPMn/8G3ObLhbeDPMIs835ek5rqTyVdpPpoBMxUMOV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78YCxdmPS7Xl+QPnq1gKYSTOJHbFTywll2pDpUMyXdoVthk9 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
add zpdesc memory descriptor for zswap.zpool
|
expand
|
diff --git a/mm/z3fold.c b/mm/z3fold.c index afdf21024f83..97580e2224c2 100644 --- a/mm/z3fold.c +++ b/mm/z3fold.c @@ -501,14 +501,14 @@ static void free_pages_work(struct work_struct *w) while (!list_empty(&pool->stale)) { struct z3fold_header *zhdr = list_first_entry(&pool->stale, struct z3fold_header, buddy); - struct page *page = virt_to_page(zhdr); + struct zpdesc *zpdesc = page_zpdesc(virt_to_page(zhdr)); list_del(&zhdr->buddy); - if (WARN_ON(!test_bit(PAGE_STALE, &page->private))) + if (WARN_ON(!test_bit(PAGE_STALE, &zpdesc->zppage_flag))) continue; spin_unlock(&pool->stale_lock); cancel_work_sync(&zhdr->work); - free_z3fold_page(page, false); + free_z3fold_page(zpdesc_page(zpdesc), false); cond_resched(); spin_lock(&pool->stale_lock); }