Message ID | 20240729112534.3416707-15-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 33155C3DA61 for <linux-mm@archiver.kernel.org>; Mon, 29 Jul 2024 11:21:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AEFEA6B00AC; Mon, 29 Jul 2024 07:21:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AA03B6B00AD; Mon, 29 Jul 2024 07:21:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 93F886B00AE; Mon, 29 Jul 2024 07:21:06 -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 63F306B00AC for <linux-mm@kvack.org>; Mon, 29 Jul 2024 07:21:06 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 1E1361A0277 for <linux-mm@kvack.org>; Mon, 29 Jul 2024 11:21:06 +0000 (UTC) X-FDA: 82392548532.15.CC1D571 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf18.hostedemail.com (Postfix) with ESMTP id 7A1971C000E for <linux-mm@kvack.org>; Mon, 29 Jul 2024 11:21:04 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=o5gCrlI0; spf=pass (imf18.hostedemail.com: domain of alexs@kernel.org designates 139.178.84.217 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=1722252011; 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=C6FyzEKOSWI6MCvUbbMT9Jgk3QqCa38I6z6Mp91Wydc=; b=3wZnG8qAVWDOLnsx0iEkKW/PtGwI34nh3hPgaQhLlXvaN/Wd1H0/ej9gGvEuIrbvuRXUX7 JmUd8mf4RBHLdpOcY3eTOak7YVcIr4w3ayuZE8HCHurB6MgmR5Yx+Id4nde+My6yeXYTcB et43jw/y2S6dDEp3iqpzC5CQZkBt3/U= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722252011; a=rsa-sha256; cv=none; b=a6G7L2byL6n/976j2sSzLkpn9olgSKtiVbEvH+VWGLfOJ6IzurpTd9/82uJl0Sgc2pQ0Bf cVQIcr0lTLnDlJfgow8Z0CRl9DsvelEBAntveP/9o5aKjMOJ5Dq4DTyykDnwfkXPaKvpdV /0kubVt7ioNuPKVAWGS9+ErQ+F3eFg8= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=o5gCrlI0; spf=pass (imf18.hostedemail.com: domain of alexs@kernel.org designates 139.178.84.217 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 dfw.source.kernel.org (Postfix) with ESMTP id B079F613EF; Mon, 29 Jul 2024 11:21:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A282AC4AF0C; Mon, 29 Jul 2024 11:21:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722252063; bh=K3GUIiHemMLy8fa8RNH072Iq/pXEu/mTjv8z/3myXkU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o5gCrlI0q81yaT0XVXU2oqnN965qfPvIFAFcpm5o8+/9uozJOlLo7KU+gwBQ+kwOP iAnLxsVxjYVw3zhS0k4gOkFU4woJ9SVcQP/bLhknsUR1zUBYaLZMii9yqmeKAuapKI U/yfn6gsE25TokO5tBSpDviaM4NXHWSY5+3PCs9Yvqwi0cNmLTS6l+swpRFFoUEw47 glc2GKCDOuvKDd4g1VWHlltI66gYTXQC67wpWqGAQwrBq4RLqouYP96rjmrEw+3uab QDMOv8TaAYsoO6R5qrWC/i34oo75n8qUzH2KXjSeYp09IZ7uZoph5jQun18uSGhPaj mQRK84Tevde6Q== 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, Yosry Ahmed <yosryahmed@google.com>, nphamcs@gmail.com Cc: Alex Shi <alexs@kernel.org> Subject: [PATCH v4 14/22] mm/zsmalloc: convert migrate_zspage() to use zpdesc Date: Mon, 29 Jul 2024 19:25:26 +0800 Message-ID: <20240729112534.3416707-15-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240729112534.3416707-1-alexs@kernel.org> References: <20240729112534.3416707-1-alexs@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 7A1971C000E X-Stat-Signature: xagnrcugkrpmg43od3edb3w9ubwzcgec X-HE-Tag: 1722252064-280540 X-HE-Meta: U2FsdGVkX1/C1zXrZHs4/UwAEJ3+dnUbaze0AIdylcD0sh0UATRwrm3ALJ2Y84cOfGQaaf+zXQ7nbbg64GyV2K4M1VenIxapFmLOMhd8A2BGlQmr0i/0pQr8wasWO4b416s+WlwfTLUtv7doXsCaIdjgy7cWNPLKzTc3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+SbJuN58zCa7r2O5ZR+pKiUooS5j16ohV6VpgIkk+FC6QXbPtIBI4KEYlgXqYhIWGaSj/dd5KzFzx5OW7jV6IOqwi9IZEzVk1dlmK+VPlwmUYH1PnpCNoG1Dtff1tC82 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 |
mm/zsmalloc: add zpdesc memory descriptor for zswap.zpool
|
expand
|
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index e291c7319485..7d039b0c66db 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -1636,14 +1636,14 @@ static void migrate_zspage(struct zs_pool *pool, struct zspage *src_zspage, unsigned long used_obj, free_obj; unsigned long handle; int obj_idx = 0; - struct page *s_page = get_first_page(src_zspage); + struct zpdesc *s_zpdesc = get_first_zpdesc(src_zspage); struct size_class *class = pool->size_class[src_zspage->class]; while (1) { - handle = find_alloced_obj(class, page_zpdesc(s_page), &obj_idx); + handle = find_alloced_obj(class, s_zpdesc, &obj_idx); if (!handle) { - s_page = get_next_page(s_page); - if (!s_page) + s_zpdesc = get_next_zpdesc(s_zpdesc); + if (!s_zpdesc) break; obj_idx = 0; continue;