From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 7C636C07E97 for ; Fri, 1 Dec 2023 19:29:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1119F8D0074; Fri, 1 Dec 2023 14:29:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0C2278D0001; Fri, 1 Dec 2023 14:29:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ECB848D0074; Fri, 1 Dec 2023 14:29:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id DD69D8D0001 for ; Fri, 1 Dec 2023 14:29:50 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id B875DA026E for ; Fri, 1 Dec 2023 19:29:50 +0000 (UTC) X-FDA: 81519239340.15.D765F06 Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) by imf26.hostedemail.com (Postfix) with ESMTP id D51DC14000D for ; Fri, 1 Dec 2023 19:29:48 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=RqZsROqD; spf=pass (imf26.hostedemail.com: domain of minchan.kim@gmail.com designates 209.85.167.181 as permitted sender) smtp.mailfrom=minchan.kim@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1701458988; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=kRp+faBok1h4ku75TpwlT6l80pF4DzF4/aYcNbWeNdU=; b=yFm5x3i9CdBGCj6JaBPGUIouwz3yWqcz8k84ZvTbuZGU8eIwLwJh/KjtHbBx7oGxj+MOke Pag35/VI9ND2wZI9dKAckpB0pmKnoUg8TBA2VhZ2BYFNRHlQ0+ELWWz8xwby4VkAzcdmNm fb1d+1avaEIbs6kCWDADj6zuCHzEpmg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701458988; a=rsa-sha256; cv=none; b=794RZxIKvNxxqDpLXk+JPP7sbdlAPcdgqO/SQ3YWPTx6Vic5FFQsmn7dEDBkPdLoCvlhVe wJz7jyBhjM7QLXQWcFTYibAbdFm+L4QPq9WQlt3ugMRXi2RKc+Vb82BY0knxYW80II5dUF 3DBYPs3Enkva9+K4u9CsVgX/xHsbumM= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=RqZsROqD; spf=pass (imf26.hostedemail.com: domain of minchan.kim@gmail.com designates 209.85.167.181 as permitted sender) smtp.mailfrom=minchan.kim@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) Received: by mail-oi1-f181.google.com with SMTP id 5614622812f47-3b83c4c5aefso568764b6e.1 for ; Fri, 01 Dec 2023 11:29:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701458988; x=1702063788; darn=kvack.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=kRp+faBok1h4ku75TpwlT6l80pF4DzF4/aYcNbWeNdU=; b=RqZsROqDAVP+jtNQG10mpjHFRrxlTDW5sCJZp1MM7Co6m+e7AcXzWp+cAP0sfsW4vd ELUB7f0irTxmyw61PYQEx/+A79fnrln55rgMZp1nIUC6wLeWLOwO63olqhHBIFyP2+MY yFtca20MHjjDeOsBc/McB+/S2+Y4UHTBxO0U91T29d+j7CtyXTHpn7lJh9cQcX5yW5gF i2h91ZQWarsDKeCb8jCieQRFBWWrGgL9foAGDyhuigqHaNyTILn7O6kyuH6K4Uq5IbbE rV+ZgcI4vZwZsLDpB0uxbvElAK3QyhYAHj17s1Ds814om3buLY3r/PR8OC5mGzLjqrjN /BQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701458988; x=1702063788; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kRp+faBok1h4ku75TpwlT6l80pF4DzF4/aYcNbWeNdU=; b=iQV1bt1BmlmtkURAnOhRGlojFV8W4ap3xUxTKMfb+Kgtowq0fs15FY4OUsWgpqguLu cwMU+7ICmgrFNaGu2NxDfvLXhKyDeQgekOETw5Ua3IH3JheXAR5s1ISsnL9aDvwGdwEg OFNXzLgMN15+RNWUSjjyq5IAI6vyF60STrknKbuohlhtpfXBEbsxlSHXiNsg7FdQsazz gHqtp0Z0zVf3ECQVUnL1IdJ4PmjlmA6WpKSN3XG13ncyNDSPzmTO6MrDKbH1yPTwgMLq aBymDLYTuQsBrhiwEVh5Ia63bqUq4vJ9qCUOIjxXsUkVnzZqkt90rGO1blBSSQTdH35w /zaA== X-Gm-Message-State: AOJu0YyG+6cN02BJcCTzmbVZRiYqGbMNOKVI/2fC5skbwrgwHmpXig3Z pq8hG7sblWtpA4+erT4VhM40iEOm7do= X-Google-Smtp-Source: AGHT+IEaRq95g4OkI1lH+SvwORh6/yMclS8Lp0UpBQfwDes0cNx3BRobtefjS/eFaKd2+uUlkgkHXQ== X-Received: by 2002:a17:903:246:b0:1c5:d063:b70e with SMTP id j6-20020a170903024600b001c5d063b70emr116423plh.53.1701458890071; Fri, 01 Dec 2023 11:28:10 -0800 (PST) Received: from google.com ([2620:0:1000:8411:affa:609d:2701:8e46]) by smtp.gmail.com with ESMTPSA id a6-20020a170902900600b001cfb41589ddsm3661681plp.293.2023.12.01.11.28.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 11:28:09 -0800 (PST) Date: Fri, 1 Dec 2023 11:28:07 -0800 From: Minchan Kim To: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Sergey Senozhatsky , Matthew Wilcox , Mike Rapoport , Yosry Ahmed , linux-mm@kvack.org Subject: Re: [RFC PATCH v3 00/21] mm/zsmalloc: Split zsdesc from struct page Message-ID: References: <20231130101242.2590384-1-42.hyeyoo@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231130101242.2590384-1-42.hyeyoo@gmail.com> X-Rspamd-Queue-Id: D51DC14000D X-Rspam-User: X-Stat-Signature: j4xiztmx65c8tjdtfgf4tgyk4pchcj3f X-Rspamd-Server: rspam03 X-HE-Tag: 1701458988-707455 X-HE-Meta: U2FsdGVkX1+S0QKSdjlITkqNXHq+Zr2pjJbW7vt2i6DK0S7btYRy5Y3N053d0Wfq1rmk3TX4OzdMFT/wH6hETKI2UEgpyDHIiQZaKT7+uh+Mp8dfFb4uZKFBPVnBaTt4iM1wQhX1Hu75s31PSrpO4tQj0ZTF7yku9FMbRVQoTR1nlR4bzM9DlJjdr6EZXdipvtCFVGPEI/rp5VHZJSvLr5XPWbaUDmZupFIm8O1KbMQjeV+l5XU7gHMjp2bcmAH+EQJVfHNK01PPRwhcUCQnsrPaheLeV9kQHizBcEd9OkAI5/zx4e9mtedVtch/3lqlLUvC7OGy0cB/oSWXXDLw3FHygID7D57Sz90HxJYgbVC01paYs/enfOm3qBIbyn/5Ja+oX0iIkP+VYZ9US4uOPiaISNtQ+Eddn1tex7srqvbtujAcxjaPNfryxp9tyrJKQceCkMIYfyIDC4VdTIfedeD3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BrcPprst0KQeSyfhq/R1NYYJBFmR2Z3g+YjtKRQfSNzQXgmZuLlFVwLIukmDvqxaL8JMca+wYdCFRo6VZd+JbY2T2nGtCXEZPKnKlmB9vlOW03qYDdrh8awyG7Y3OaIOpvCXIkEH9WHBCU9ttoj0g0gL7NriPmX6AI9m+ev0mKvgOWWaKzDkH2QaZXgzkWSew74qTyGSQO9JoUepIVif7g6lOKRSdtcaKmhGZCmChTMLSDpf9KB1w/JV08gJcr4A/5 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: List-Subscribe: List-Unsubscribe: On Thu, Nov 30, 2023 at 07:12:21PM +0900, Hyeonggon Yoo wrote: > RFC v2: https://lore.kernel.org/linux-mm/20230713042037.980211-1-42.hyeyoo@gmail.com/ > > v2 -> v3: > - rebased to the latest mm-unstable > - adjusted comments from Sergey Senozhatsky (Moving zsdesc definition, > kerneldoc fix) and Yosry Ahmed (adding memcg_data field to zsdesc) > > > V3 update is a bit late, but I still believe this is worth doing. > It would be nice to get comments/reviews/acks from maintainers/people. > > Cover Letter: > > The purpose of this series is to define own memory descriptor for zsmalloc, > instead of re-using various fields of struct page. This is a part of the > effort to reduce the size of struct page to unsigned long and enable > dynamic allocation of memory descriptors. > > While [1] outlines this ultimate objective, the current use of struct page > is highly dependent on its definition, making it challenging to separately > allocate memory descriptors. > > Therefore, this series introduces new descriptor for zsmalloc, called > zsdesc. It overlays struct page for now, but will eventually be allocated > independently in the future. And apart from dynamic allocation of descriptors, > this is a nice cleanup. And the new descriptor doesn't bloat anything for zsmalloc meta size. Right? Please specify it into the description. > > This work is also available at: > https://gitlab.com/hyeyoo/linux/-/tree/separate_zsdesc_rfc-v3 > > [1] State Of The Page, August 2022 > https://lore.kernel.org/lkml/YvV1KTyzZ+Jrtj9x@casper.infradead.org > > Hyeonggon Yoo (21): > mm/zsmalloc: create new struct zsdesc > mm/zsmalloc: add utility functions for zsdesc > mm/zsmalloc: replace first_page to first_zsdesc in struct zspage > mm/zsmalloc: add alternatives of frequently used helper functions > mm/zsmalloc: convert {try,}lock_zspage() to use zsdesc > mm/zsmalloc: convert __zs_{map,unmap}_object() to use zsdesc > mm/zsmalloc: convert obj_to_location() and its users to use zsdesc > mm/zsmalloc: convert obj_malloc() to use zsdesc > mm/zsmalloc: convert create_page_chain() and its users to use zsdesc > mm/zsmalloc: convert obj_allocated() and related helpers to use zsdesc > mm/zsmalloc: convert init_zspage() to use zsdesc > mm/zsmalloc: convert obj_to_page() and zs_free() to use zsdesc > mm/zsmalloc: convert reset_page() to reset_zsdesc() > mm/zsmalloc: convert zs_page_{isolate,migrate,putback} to use zsdesc > mm/zsmalloc: convert __free_zspage() to use zsdesc > mm/zsmalloc: convert location_to_obj() to use zsdesc > mm/zsmalloc: convert migrate_zspage() to use zsdesc > mm/zsmalloc: convert get_zspage() to take zsdesc > mm/zsmalloc: convert SetZsPageMovable() to use zsdesc > mm/zsmalloc: remove now unused helper functions > mm/zsmalloc: convert {get,set}_first_obj_offset() to use zsdesc > > mm/zsmalloc.c | 578 +++++++++++++++++++++++++++++++------------------- > 1 file changed, 364 insertions(+), 214 deletions(-) > > -- > 2.39.3 > It's straightforward, and I don't see any problems. I sincerely appreciate your dedication to making this change. Thank you, Hyeonggon!