Message ID | 20231130101242.2590384-18-42.hyeyoo@gmail.com (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 1327EC4167B for <linux-mm@archiver.kernel.org>; Thu, 30 Nov 2023 10:13:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A2A968D0038; Thu, 30 Nov 2023 05:13:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9DB6D8D0001; Thu, 30 Nov 2023 05:13:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7DEE48D0038; Thu, 30 Nov 2023 05:13:52 -0500 (EST) 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 6A1D48D0001 for <linux-mm@kvack.org>; Thu, 30 Nov 2023 05:13:52 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 40B7D1C0081 for <linux-mm@kvack.org>; Thu, 30 Nov 2023 10:13:52 +0000 (UTC) X-FDA: 81514209504.23.BDC22EE Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by imf01.hostedemail.com (Postfix) with ESMTP id 702B440015 for <linux-mm@kvack.org>; Thu, 30 Nov 2023 10:13:50 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=FswxOfwq; spf=pass (imf01.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.210.173 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1701339230; 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=jy9auwkflPmOczZw4Ui3jCyKMI56Rp84VrWiQ/DbUxk=; b=r1p8ExhdOUBGG8SU59dznbATe+d1Qpq6sxBRXJbYH5jb0BULnCQrHGaFIG+QtmhquDcA9M Q7b40LIPQ1ov12ULYm5M9ygBufs20GU3XhXiovLxs9XfYUIysJI4f/tEWXw+20sAlG9/Fe xUYgS3YjjSe/iSxNBj8JsHQjTq/fhcs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701339230; a=rsa-sha256; cv=none; b=pgj+wZI5vtx4cmHCIhSrwh3uidfFKYO8rgQWrqrE+t8pXRxgnScTI8UVOsC15G/o7RIVWE uuAOsxMw0NoEFPSVw1gL6ACCe3vZk7rIMk0nhvVNpIr6XKb9LTEC9Bq4fMm/OE7HCHGrW6 KRzbSHHlw/SfK+bEdhPabcKW8OspCYQ= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=FswxOfwq; spf=pass (imf01.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.210.173 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-6c3363a2b93so704062b3a.3 for <linux-mm@kvack.org>; Thu, 30 Nov 2023 02:13:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701339229; x=1701944029; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jy9auwkflPmOczZw4Ui3jCyKMI56Rp84VrWiQ/DbUxk=; b=FswxOfwqjQvyTS2IaZaxU140jBJwxVoq2RScBGsHWZs/loFdS3LTm/riFea9Ri5ha6 in16UaTdl7B02lPmS6AA+1OzGyaIfWdiOa4uAV/9++xt42CSOtGLDc+wa+1erUi3gH8Y PojWZU9MeGPZoIhHAlwuzv7CiC4keistO4xfqNnC7XSij5yhdmND7m7CR8acojItTeIa v+qgTs7/NnCOzU1mXv4Jrnd/48yJ/HP5wi3arpQEzHyP9GM96heNWD6a8OHHeTfD/eAc uteh8K0JA3aukXpmxZRicyZwCiMaReo23zh0Wdzr5fnkB4yS6k5+7XHy41L/4PqnZiHo LcTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701339229; x=1701944029; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jy9auwkflPmOczZw4Ui3jCyKMI56Rp84VrWiQ/DbUxk=; b=wmVNtQhkbvj9j4VDS+QeYRNO2LdDi8eFfFFzfcY0SIIQgy0XIwpwYoFqX4FIBDko8j 3/slvpARkcakA0OUDEabcu77TVvDxMpo/WExFxXRTZ9Eo6CPbp+PdbgyC92YgsT2bMzr 0iZZ2dK8icaoNqpA3SzN3fXzFDim/hgOTSsntQ65MLcJmPDNq7hjUZ/muCuElSB9Bc25 mGF/nTmQD0UDq8L2NSKL5Ihbta55nhyduWeqn5fFlrEjKJQu/8DTBzCdVtxm6MOZ5Uit l8K8jgFk17noBAqSbMsD8PuIaN6UaXTILdDanUPlQTKaQwzBSeOG7aQPeCrKaER28YUZ d5Vw== X-Gm-Message-State: AOJu0Yy3/M6PABY5v4nrj5LFgoWnYM47YsudaWxVIFv7pevKskZfiElq Z2vAYNqGDofA9njSjfoHLv0= X-Google-Smtp-Source: AGHT+IHL6Jh3rlmAl49NW8CXnxehlfI60yhGcQ5hvU58pJRbDpI+sx+Y+pUqIea6TG2ydnUmae+ofA== X-Received: by 2002:a05:6a00:6c8f:b0:6cd:dc54:f757 with SMTP id jc15-20020a056a006c8f00b006cddc54f757mr3755498pfb.24.1701339229280; Thu, 30 Nov 2023 02:13:49 -0800 (PST) Received: from localhost.localdomain ([1.245.180.67]) by smtp.gmail.com with ESMTPSA id r27-20020aa78b9b000000b006900cb919b8sm841402pfd.53.2023.11.30.02.13.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 02:13:48 -0800 (PST) From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Minchan Kim <minchan@kernel.org>, Sergey Senozhatsky <senozhatsky@chromium.org> Cc: Matthew Wilcox <willy@infradead.org>, Mike Rapoport <rppt@kernel.org>, Yosry Ahmed <yosryahmed@google.com>, linux-mm@kvack.org, Hyeonggon Yoo <42.hyeyoo@gmail.com> Subject: [RFC PATCH v3 17/21] mm/zsmalloc: convert migrate_zspage() to use zsdesc Date: Thu, 30 Nov 2023 19:12:38 +0900 Message-Id: <20231130101242.2590384-18-42.hyeyoo@gmail.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20231130101242.2590384-1-42.hyeyoo@gmail.com> References: <20231130101242.2590384-1-42.hyeyoo@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 702B440015 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 3pj5peaiqn6d5azy5ni6m3tz7w4e4pnn X-HE-Tag: 1701339230-740266 X-HE-Meta: U2FsdGVkX1/sBpblbeW2Eb1WubydSisBAzNL814HU1VAJq0BtZmtoz+C+z73YgpXTDiP3XRmJGRPC1NgZARWlV2NW7mA5CwkgT6LnRIrKWnU613nqEzkD4fjUnvqLDUYpv2GPjCSzdVhnYzWiI4F9xIDM/Ssg/O9PymJZxBJvbcGwCqQhcDU6AazmJac0Juvj8gKs4cKfnmV5wBD/MnsZ6xMarPsKjOAIOTxatgSMVgCiLiWbkqrF0NHWW9qfftpewqfS7lj00p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nvcKXZj4aI3QyqkClJfM81ByKifDkR7y8/EGjQr/jXTE/cfEUL5ZFlIDC2AibIortFfUR7plzBzIdoHiZTNGfi865r/16j/cJXt05jjI211ixFSqhGtOiT7SJnxr6sWjmZg6exz+udDGvRVmkIQn0LXX4h5PEZpC4jesQdM6y91qy4Vt7Cf6hhAdkec0AA8JD8xc9BIte52wWRrltFL1M4Ad0EpxoX6NKCvZp8wH91xptnpUAG3oA05OrIqjyD8Vz8d+2jg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000005, 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: Split zsdesc from struct page
|
expand
|
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 317bb0e8939a..91ff1f84455f 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -1750,14 +1750,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 zsdesc *s_zsdesc = get_first_zsdesc(src_zspage); struct size_class *class = pool->size_class[src_zspage->class]; while (1) { - handle = find_alloced_obj(class, page_zsdesc(s_page), &obj_idx); + handle = find_alloced_obj(class, s_zsdesc, &obj_idx); if (!handle) { - s_page = get_next_page(s_page); - if (!s_page) + s_zsdesc = get_next_zsdesc(s_zsdesc); + if (!s_zsdesc) break; obj_idx = 0; continue;
Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> --- mm/zsmalloc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)