From nobody Fri Dec 19 04:00:48 2025 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 B368515FA92 for ; Mon, 2 Sep 2024 07:17:21 +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=1725261441; cv=none; b=D8idqp1q5RYglP364lNqIPiTBQ9Q0oSlVImMScP2+0PekVL4ENGBW8yRe9Q3laX0vyWnAkgwFJYMmo6x+4dbLRwNRHOtSqsKBLgsg9SGUtzShYk/eq7HCjVqsPOGw2ZWhwIEVEdDf9RPbB53FcrJDAvQBlIwirQupqDsjhZjURE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725261441; c=relaxed/simple; bh=oMrU85lTLRKqEwjZvX+/RAn/IsBRgGpZpbsgEGeKZYk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SEXxDNVyW6kW30Ci3YT4hC4+i3w8awSB0zRNzOzxiJ4ho9gnkpmloXBXQMFAcF4yLbJm6JiTUPQ3+83waKZ3KFu2n8FAysF8pbi5wPQfoqBfYcmXj100bN4oUjSXdoBVd2JI+zL7aSj7UeivnX8j1rJLbUTQzwtt0H5RXvRLcEQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uTv2JYWK; 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="uTv2JYWK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACE76C4CEC2; Mon, 2 Sep 2024 07:17:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725261441; bh=oMrU85lTLRKqEwjZvX+/RAn/IsBRgGpZpbsgEGeKZYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uTv2JYWKBWs/eY3vQwV4b7d46Dw+8FnfttVYa627PvUXCjgj8YFZiXNE2cONgQ2vD JkgfML6hEagHjvBeo08sMYm5L9jLkSjtkTdRS7T2LkNHQcFsDx2bVCHMuvp3eznYve SC/wsNxQ0jT08WxCgk5l1VnUbaEx4JcQxRDMcaxevO06zXMJubQ+lKPSu3nErUeF92 QQGh6bVLa6es1W1dR3HomaK6ZvUGMjggVhm7u6kO/swf/AcMtavkx6lsFCqJXQU6Mi 1Vo67rxmdi0vb2Ei+Mo06rE6WDhBAFTKNqdPX1iPelhAwfZsjP4PMzXFTcnadVGpX5 LyF4L2q+hsbNQ== 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 v7 14/21] mm/zsmalloc: convert migrate_zspage() to use zpdesc Date: Mon, 2 Sep 2024 15:21:25 +0800 Message-ID: <20240902072136.578720-15-alexs@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240902072136.578720-1-alexs@kernel.org> References: <20240902072136.578720-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 --- mm/zsmalloc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index f94c3a6653c7..aeb8cab5767b 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -1623,14 +1623,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.46.0