Message ID | 20240708063344.1096626-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 10683C3271E for <linux-mm@archiver.kernel.org>; Mon, 8 Jul 2024 06:29:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 91AA36B00B0; Mon, 8 Jul 2024 02:29:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8CBBB6B00B1; Mon, 8 Jul 2024 02:29:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 76BE16B00B2; Mon, 8 Jul 2024 02:29:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 532106B00B0 for <linux-mm@kvack.org>; Mon, 8 Jul 2024 02:29:39 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id CD59B140874 for <linux-mm@kvack.org>; Mon, 8 Jul 2024 06:29:38 +0000 (UTC) X-FDA: 82315609236.11.36C8A3E Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf05.hostedemail.com (Postfix) with ESMTP id DA3E7100014 for <linux-mm@kvack.org>; Mon, 8 Jul 2024 06:29:36 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=UJRGhy3n; spf=pass (imf05.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=1720420154; 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=wqxxSvqCMIZ21aSVFDr+uBI0lr6IEYEhrBmWF4x5Kfw=; b=biTR1zZHKBsbrQditnzXwJMHjG+MAqnxzkAD5QaumXCFOAE1wafue2xSW3UYbp1vy10Yop ptZVL6e360dvVSiw+emBbv02ygrX/XfDSCH8uoja6QCudP0JYR4yIhsrXL3PJ5MJ5kzBQz 1Aij5plwXJLVTuEA4AsC7pSuPLB7n2w= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=UJRGhy3n; spf=pass (imf05.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=1720420154; a=rsa-sha256; cv=none; b=Du93ozA1sHZetFE3B0TEpZqdl9Xu3zwji/XuI0Lic6oRRhznRY23Z9l6r65uWV49dnkkb4 PZ6bchxtOpkNQGlVCG7f3srsERZ+oFDQXysrrg8f40tNBnw7+lp372pULU/T5tRtMKDRHQ G8As3PYWIoPUc4qw3ZoUCqhanvoARbM= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id E4F70CE0A7C; Mon, 8 Jul 2024 06:29:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F7BAC4AF0B; Mon, 8 Jul 2024 06:29:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720420173; bh=cbT48olUQwlsCFwwUYnjfHlBbFy2rEQMOoWsy01+W3Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UJRGhy3np6draIrQ5dcJhaA8p3BR4ME3fuTKdWducweIJsmTBd+uSKYPdZll3y7rm BxNOBa57Zm1zxbKwTabeuj6D09i+Zx1Uqgc0/aMswDBCkx3BTVd/V86FadDBFg1jSX BwKjViQcGzHORnrteaoEWLQOTQNPKxr/BeqB/dbTV5U0VQTG/0EXsIWSJ2BmctSbcS 2viqi+gbSiBA8ugd6tbWwy5+9acn1fm262K3J2Ks5WpmB6jzbUYQUrPsTs9RMuSHtF oCsf2LjiyQPjkrP1tVBJhIa6h36V1RZwq/GgYIqENIYg8Da1WzohE7MWLj8O9AMB8z hNL8CYaHOa2kw== 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 v3 14/20] mm/zsmalloc: convert migrate_zspage() to use zpdesc Date: Mon, 8 Jul 2024 14:33:35 +0800 Message-ID: <20240708063344.1096626-15-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240708063344.1096626-1-alexs@kernel.org> References: <20240708063344.1096626-1-alexs@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: miskzgm69m13zywzpkudu4fdrw7x8fmd X-Rspam-User: X-Rspamd-Queue-Id: DA3E7100014 X-Rspamd-Server: rspam02 X-HE-Tag: 1720420176-758036 X-HE-Meta: U2FsdGVkX1/wriH3SSc+1xf9FGpNwLLxiENrTQF0j3YlCEbjEHFKOWhiqXBBOISQtKqoMdz6/a3f1rVdTaZwuUYaYQPf2i2uEY3ipBQ3aLSNTpigdQubAjRAfszZ+wumdEbA4Qco49ZGaw0CeRgK8iPeaLu2d3l+GBgrvK2D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w6kb8uG7Z9eubJgSTXTny9oyhjKOKg/deoP41elxExP068uBGxmByuDBiQkCfpQILaSyLTARwAphE/UBvZHCrNtYZFVJ5upsBf0VTrBRI7T11g== 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;