From nobody Mon Feb 9 21:19:07 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01FB21CA96 for ; Mon, 8 Jul 2024 06:29:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720420174; cv=none; b=QeRvfY6N2qSjipcH5d2eR9OzzLvcZyhiUo2Os72C9rELEyjLQRrVkRtrAYc0NuzO4UK2RrJp6rmD8OPZelhM3Y/x3Zv1E/Vvsk/sqZ/v39mAoRss1mr1nrxLYOS8i4WXQi9jC/5dlhOUMYMZv3V0Vparj0cytAaFpEzZTUxptb8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720420174; c=relaxed/simple; bh=cbT48olUQwlsCFwwUYnjfHlBbFy2rEQMOoWsy01+W3Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rsfplf4Vh889/hUM/eAC7JbAQBfKmtMgz8X2LBNU+yNim7iZ9NVg5x+EpRhCG8l6qaUJw99Kp1jZ1CkoivqpJn6RkfXncTkUhnG7/eWHflPlnbwi1MDdJN/UZiO5UjLY9/h6CQ57xvR6tT0HIufQiWwhe+U4Qt3XvQwAnj+d+GQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UJRGhy3n; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UJRGhy3n" 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 , 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, Yosry Ahmed , nphamcs@gmail.com Cc: Alex Shi 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Hyeonggon Yoo <42.hyeyoo@gmail.com> Use get_first_zpdesc/get_next_zpdesc to replace get_first/next_page. No functional change. Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Alex Shi (Tencent) --- mm/zsmalloc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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, st= ruct zspage *src_zspage, unsigned long used_obj, free_obj; unsigned long handle; int obj_idx =3D 0; - struct page *s_page =3D get_first_page(src_zspage); + struct zpdesc *s_zpdesc =3D get_first_zpdesc(src_zspage); struct size_class *class =3D pool->size_class[src_zspage->class]; =20 while (1) { - handle =3D find_alloced_obj(class, page_zpdesc(s_page), &obj_idx); + handle =3D find_alloced_obj(class, s_zpdesc, &obj_idx); if (!handle) { - s_page =3D get_next_page(s_page); - if (!s_page) + s_zpdesc =3D get_next_zpdesc(s_zpdesc); + if (!s_zpdesc) break; obj_idx =3D 0; continue; --=20 2.43.0