Message ID | 20230220132218.546369-4-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 9A1EAC636CC for <linux-mm@archiver.kernel.org>; Mon, 20 Feb 2023 13:22:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 36A826B0078; Mon, 20 Feb 2023 08:22:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 31C166B007B; Mon, 20 Feb 2023 08:22:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1BB8F6B007D; Mon, 20 Feb 2023 08:22:45 -0500 (EST) 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 09D186B0078 for <linux-mm@kvack.org>; Mon, 20 Feb 2023 08:22:45 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id A3A2FC0327 for <linux-mm@kvack.org>; Mon, 20 Feb 2023 13:22:44 +0000 (UTC) X-FDA: 80487735048.21.9C2674B Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by imf13.hostedemail.com (Postfix) with ESMTP id C010C2000A for <linux-mm@kvack.org>; Mon, 20 Feb 2023 13:22:42 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Glm0gzqa; spf=pass (imf13.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.216.42 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=1676899362; 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=gHVykDnTVfEe2ltKGMI8bVmCtEd1vNV39cKBYU9Qx6I=; b=Ze7687vAasrfdrnNytoETvUB8p8f6B18iIt1KGjbhz1li5HsYFXaIWWmjaK3y2qYbsKObP sY2G32aS7J67fXu9lUybvgV0LklgjLMk867P7vVmRgSq5MrpPyO5KDYLwqzxzjymvwFHdj qrPXiBzIlt92pAUeI0GS630UCT0OXjY= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Glm0gzqa; spf=pass (imf13.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.216.42 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676899362; a=rsa-sha256; cv=none; b=gACHmg6tImMSgTVFTl5oVRZfgqGIP4kF6rotfj/FbawvYmwRVh/IBM8cviaMWWqblhSV58 5rUDQSRKyT/Aknm/z/nzFno+hz3y3lAs7Xc31pDR7R5S5pWwtcOqOg8B/RHcFyoNaIqFCT nuEoyWd4PuNoXB7JJ1n2wqD58T0Efj0= Received: by mail-pj1-f42.google.com with SMTP id v3-20020a17090a6b0300b002341a2656e5so1256934pjj.1 for <linux-mm@kvack.org>; Mon, 20 Feb 2023 05:22:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=gHVykDnTVfEe2ltKGMI8bVmCtEd1vNV39cKBYU9Qx6I=; b=Glm0gzqaEn24tR7vRh2d03QbFcPso1B81L7JYDblYbyNFuMFv2rxyv+ZMoprvv/nlL nQcNu1FJsOiE+iIcQGdFkuBmWA+RnK3pCFeCGghriEgGEIMbQCwza1oSwuWbB6LlIB7+ 2zVKWFV040ExfU54b9S/58TNxbZ53rw7zH5RYikzuIzBCS+J9QgnzK4nHUT3Tp0Tom5/ T3UwJAdSTsOqTTNGwXey+CihsIKksZtGjKkvck4J0D9/nIKRXLE0zNk30JQrYaN42EVT R76x1JF1Pb+0LiGSlqrGGw7o9A65is53CWRsXveXkPE61bvNRioWvhuTGxIeg4MEjsXB VgWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=gHVykDnTVfEe2ltKGMI8bVmCtEd1vNV39cKBYU9Qx6I=; b=jqs/fL9bxLlEK5EYKn2cCyt8MP1rLehHIs2nV8MKyZIs1md30liHe09O0E8oM3a0dN kAMr+Ig/2/laLA38+yuMKXBpDkBkAq4VSqo7bqCmYwxB/aqGGQ720Uvxml4D6MzimVSl fKOx1Q9Gn7ekFD1UjYU0tSSM6if/rNTzl9ZYiym/rQdwq9FoKU9RYjaRl72YElAriyKA 7RDTIoKkqGGUzAVHRAWU9cFsDbsePhT3ZI25p4a/EZl4kBYRebBsjdE6VS2zO4VUMc9B 223yM7eaHywathYipn4wKAlEaPgGBtL7egCTSAGBk4CbZ4isTlLOu5+899dBh3oOnKlH HTLw== X-Gm-Message-State: AO0yUKUNfWHSgM4CRlT9zI+Tkk/6oudG/TnCKqz9PjwikLdJfWEozt3F 6D7HsRihvFgn/IS42VPR7pU= X-Google-Smtp-Source: AK7set+pjIt4s6OGQKGkcSK8PSwsYil3ELAbpE6plGBQn0/WKJzyVHDWLiYk2L+SJxnVX3ub0mcleA== X-Received: by 2002:a17:903:1c8:b0:19a:ebdf:1994 with SMTP id e8-20020a17090301c800b0019aebdf1994mr4632276plh.52.1676899361726; Mon, 20 Feb 2023 05:22:41 -0800 (PST) Received: from test-ha.kr-central-1.c.kakaoi.io ([210.109.63.229]) by smtp.gmail.com with ESMTPSA id x2-20020a170902fe8200b0019c13d032d8sm6125436plm.253.2023.02.20.05.22.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 05:22:40 -0800 (PST) From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Minchan Kim <minchan@kernel.org>, Sergey Senozhatsky <senozhatsky@chromium.org>, Matthew Wilcox <willy@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org, Hyeonggon Yoo <42.hyeyoo@gmail.com> Subject: [RFC PATCH 03/25] mm/zsmalloc: replace first_page to first_zsdesc in struct zspage Date: Mon, 20 Feb 2023 13:21:56 +0000 Message-Id: <20230220132218.546369-4-42.hyeyoo@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230220132218.546369-1-42.hyeyoo@gmail.com> References: <20230220132218.546369-1-42.hyeyoo@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: C010C2000A X-Stat-Signature: aoge7baoiqrginfg47wkxyt5emqe5jwy X-HE-Tag: 1676899362-177307 X-HE-Meta: U2FsdGVkX18w4qHRkBxjfO0XM2E3L/iD1W/mb16szCWKTT6oGKFzLXfnCmDEUm5tKurbfn7mee8WF7uuMvsAOPtvWZJq5Wp8pPbBNl1LgiZeQ6Pkm25ZrlqDhe1h8VrE3leFKlAPiHksVF6556cynhHDxFsdiPK30yi9SUZFxwPBK5a16ncw6hGDlwT8kJShmyuVQ32HatX6OOADXyPOL3yQFHo3xxk/Bi6yLUMd57WQge3Upq5w7YlsDX2hLsIF5dZ7oePOnTiPHUb9g5AA7IL9+WL3VlK88qUMTWH1fmXtMM/uO0Iqq6mRXgydNwHDWwQ+z7mdfaTurgIJU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xW+0HEmCnFTvJOWv3EQDp0ZLCL3bjAhgzi72Yi3B0RqVLkXMQ7CpcrFccllJ8jV1blRjj68V5L+GUNtAJ4pIZx863hjh6iTirdZYBHGhuWl7Zy+a38Dztq1Tshd6LoctrhymeSWihIcvNhhAjkBf51lC/KVwvOXMvRYhtgMPwB4aJ2fhTplWMdsy 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> |
Series |
mm/zsmalloc: Split zsdesc from struct page
|
expand
|
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 4af9f87cafb7..f7b6b67e7b01 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -266,7 +266,7 @@ struct zspage { }; unsigned int inuse; unsigned int freeobj; - struct page *first_page; + struct zsdesc *first_zsdesc; struct list_head list; /* fullness list */ #ifdef CONFIG_ZPOOL @@ -667,7 +667,7 @@ static inline void mod_zspage_inuse(struct zspage *zspage, int val) static inline struct page *get_first_page(struct zspage *zspage) { - struct page *first_page = zspage->first_page; + struct page *first_page = zsdesc_page(zspage->first_zsdesc); VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); return first_page; @@ -1249,7 +1249,7 @@ static void create_page_chain(struct size_class *class, struct zspage *zspage, set_page_private(page, (unsigned long)zspage); page->index = 0; if (i == 0) { - zspage->first_page = page; + zspage->first_zsdesc = page_zsdesc(page); SetPagePrivate(page); if (unlikely(class->objs_per_zspage == 1 && class->pages_per_zspage == 1)) @@ -1643,7 +1643,7 @@ static unsigned long obj_malloc(struct zs_pool *pool, link->handle = handle; else /* record handle to page->index */ - zspage->first_page->index = handle; + zspage->first_zsdesc->handle = handle; kunmap_atomic(vaddr); mod_zspage_inuse(zspage, 1);
Replace first_page to first_zsdesc in struct zspage for further conversion. Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> --- mm/zsmalloc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)