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 89312C4167B for ; Sun, 3 Dec 2023 05:21:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 88C986B031B; Sun, 3 Dec 2023 00:21:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 83C746B031F; Sun, 3 Dec 2023 00:21:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 705646B036A; Sun, 3 Dec 2023 00:21:36 -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 6119C6B031B for ; Sun, 3 Dec 2023 00:21:36 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id F1F22801BD for ; Sun, 3 Dec 2023 05:21:35 +0000 (UTC) X-FDA: 81524359350.05.0CA6332 Received: from mail-ua1-f51.google.com (mail-ua1-f51.google.com [209.85.222.51]) by imf16.hostedemail.com (Postfix) with ESMTP id 3A428180007 for ; Sun, 3 Dec 2023 05:21:34 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=OidOCG+0; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf16.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.222.51 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1701580894; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=40lb4w1FJL7Ob0eXlO/HKCKyCXz08GwVZL6DnVQ9vmw=; b=4XVa1FA0d2VYB1UWHMFRFM0f1lViKf6+0aNGPLfAQijvybLOXMnzLzuAlx8P4lw6a3qu86 pVGdKVbA57/Yo0oXr4cpsTbqolOt+wi55VsO4pRy2FtOJfCF766acql6BE8X+gdvmRa65A OHRHhRNjAKfRFtHdf7GTyvhgsEaHR34= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=OidOCG+0; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf16.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.222.51 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701580894; a=rsa-sha256; cv=none; b=E/bl9pSiydyvPfe94f+8k9kYVlKaWQzuAmeQludbC0Pnbab2EwBLJtajiGW0RhISymx0aH ODxliclxX+tVTA1sjxQkJxfmhcfA7nEitDWfkVHv/pzsDYLQQwIPkEXc2sq4ZqOhnDf4WS Pc67oq5/aCGWNVQROPwk1KRdPRKt5pE= Received: by mail-ua1-f51.google.com with SMTP id a1e0cc1a2514c-7c4bcb4e890so1150523241.2 for ; Sat, 02 Dec 2023 21:21:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701580893; x=1702185693; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=40lb4w1FJL7Ob0eXlO/HKCKyCXz08GwVZL6DnVQ9vmw=; b=OidOCG+0X4OZ2HULyGUB2AUp2qarTq8Ueq3Bplvt34G3GGKoWsb1XBrUwZyR9/Q//u i0jxPlm/pp3Ftadv6S5z1rXvG9AvR26tNBvWWtZB/EsPoTP86yiqK0hHb2OoQdBdI2Ze zttavV+oY/9pUe52zU7BjDgw5d6+6UKWgUN/NG/sThhk1yfLz3IgMTH386duaEJCMAYz saDbDb1nId5q79zOzjHKnGXSpL9B4aknSOJ2jubTCSO8ymQDRMxaTPNGM0ftiWO2QViK WoTav8TuKqM54WIpMDGadDWuKSUidvdwgR9+bwpJ2ygUfatZweknvsRB9yT9ZXew+7lb l53Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701580893; x=1702185693; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=40lb4w1FJL7Ob0eXlO/HKCKyCXz08GwVZL6DnVQ9vmw=; b=jU74AwHcnDtf1IcLmhE38VV4X+W5K/Mvq39+uaMCditb4uJDBidINMJZZey/5ItlTx V7PT5FhLf49mueG5EDM43Ck0yo8ge7H3R2gD0YqEkOTlGlqR4/6tnXH0RhOMjWx3IRt4 W963A0xKvrZ34rhypM5LSW7xtMbQMd2BzvbRRtDXih9Hr7rYShRipkXXlh6m36NO+izB 5QkSgRyDFmIPTX1wUwOdq0vzvKbcN4mpiCHdi0KvUvBQY4yB5BVWDgPkADnPxtcXKBc9 i/+jrkwUkw19cehVFGxtGZVqnMfOOar8E43LaAsu/MxXlp0gD+gYuo0A3a3LW/w4KxE6 mtfg== X-Gm-Message-State: AOJu0YwT6V1yGjpr+JYklFg9ezOUgnqd4enCsBa1KLE5ZMDrQuBreUBo Dv2IG0z+zCffo7paN8Nfm6xyeuohNIt7wlxSIyY= X-Google-Smtp-Source: AGHT+IH3bSi27MxA4IwSJxjnAV/SCVCiEceLFvS8M6LlXMADZVqQCTw4fMsowZvSyE25pmie1EtCEb6XIDRMueGsDJs= X-Received: by 2002:a05:6102:40d:b0:464:77f2:560 with SMTP id d13-20020a056102040d00b0046477f20560mr740975vsq.50.1701580893126; Sat, 02 Dec 2023 21:21:33 -0800 (PST) MIME-Version: 1.0 References: <20231130101242.2590384-1-42.hyeyoo@gmail.com> <20231202043637.GC404241@google.com> In-Reply-To: <20231202043637.GC404241@google.com> From: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Sun, 3 Dec 2023 14:21:28 +0900 Message-ID: Subject: Re: [RFC PATCH v3 00/21] mm/zsmalloc: Split zsdesc from struct page To: Sergey Senozhatsky Cc: Minchan Kim , Matthew Wilcox , Mike Rapoport , Yosry Ahmed , linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 3A428180007 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: hycc4kojks9qxuur145s5eyw5mrw6k57 X-HE-Tag: 1701580894-308684 X-HE-Meta: U2FsdGVkX1/aYF0GJBrUGRXd3kM9P51Yg9BlzIG08xXCHQhmFNelPw1ezgSpKsjUzGiAM8ysCm2KDzikuqAye509+8QMl/9lcic0XA0rMLV6NzVHQB2cttmVgEjLuciUvTG6bXObLju9SNzAxzvFhtN4dRSOFIiJjLSzABQOEG9ThnoqQ3zggoizdMdHlmGCOtgIehHaLKMn7oXdRP3dm362rEbM/Vms/vEZpQw4KELYHRriW7iQGWsEPeL7S4iJXCXYMLKcJ9MotfuIYeDZ80m6iHbA3wScJYDwKu4gew9GsX/MNUeRIGjoXYE2brj7wtB/a9y7J9c0jk486kX1/OHMYMy7cTYtcYgoh9AAL0wHAB4px9KTAjYMZXZo7MIKj0BBu+Z1FCxlSnFKNQDUN0GaIfIcXYmgTWJex457JFfy7iAPAFy7FkyUmqbYWNENIBhWYS7lOMZs8e7fM8XTYRHtxe3pxBuHMql5C/cfGqnRcZl2DJllEuzj5MKiZYH/4s+/YVrVE1UH669GmWZ10HeWsz8mv/yaq+q7ENz7Hf3lErIQwhdk6YSNFkBq0vo323zieHQWLjTAAhMB0glpnJJ5QBa+jch0ejWXKlLv3zb7lDjdngrRLvWnjCzPC5aQ+w7jnfgdmipqubnCgr72hvSg0bc60fGs5MdD/aAZesyOz99wj+xHrH0VVzqM/0y7ENc3TzC+B3ZaEt6H5oc+U/dVxpC19cEvbDVX5+fvhltsV3aUZTLHmnGvM8fzaB/lO52VCWiCP2mFmo2wucpSI8Y2I9KaPKd5T5YkQ2KXH0Zl0YqDAY0BdVysHUiWHUs3ZHauPJBUN6+FzS0MZG/p/3V2uluW1OjyJWQD5PGgoQ0d5P00bOObG8D7gDNeFvZoMOFAZTRyf0/YIrmTXjhdRDFul8tNaHJbeoz58hh75RSnjyJ6g17brHnZDC+pQzGngFxTz/Z8/D8/mZtcT3N RGQ7nQ9Q gfkRuCQD7Nr7iF9/mWmSd4WE2XOaXUs7+x48zUOL41kGPACKKzMFb2omgUXaNq/H6zSm4BlN2PlLCRdxrGuHo3pkrn7ytkQ3PVj5gulrGO9Sqky7jVxoSiyZOsOKoCfXZaArtjq/o/ZFrwap6a9YtpAqL43CM5NNQcGHWnB9s4d8+5yIzqwZPzXU0+oVKL5PDMqGZ2DpuftyTAoQqQPc5bDvdzD4UgCWm6zTVUV6IiULWGurytcBiHzMOFecQ1KcJRqmzjzUzhKrbg2i6pdkgwryr9XzdVizNDB8sBUROGMCQZKY5MeSQBb0smNpGcmKjsBlJI6JG1VIS6+0pBvOhEmLNzY05LEf9CrY29J1qXhBtKM2wLw1rgYQ0CLs57I+bTKhfHkD38rbl7Mgi3v9HBM9u6ac+JMMX0cwGYtGS5Uj/IcI/cSzANYioD08UoedNnTj5tXjbtilcP/7z1r9gyvnOecKBmEy1fLt7ghYVMB2vIEHoI92enQU7kC2F/s1RWbpM+rOB5S0TlLJxeHUgaZH7rw== 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 Sat, Dec 2, 2023 at 1:36=E2=80=AFPM Sergey Senozhatsky wrote: > > On (23/12/01 11:28), Minchan Kim wrote: > > 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.h= yeyoo@gmail.com/ > > > > > > v2 -> v3: > > > - rebased to the latest mm-unstable > > > - adjusted comments from Sergey Senozhatsky (Moving zsdesc definitio= n, > > > 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 zsm= alloc, > > > 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 separ= ately > > > allocate memory descriptors. > > > > > > Therefore, this series introduces new descriptor for zsmalloc, called > > > zsdesc. It overlays struct page for now, but will eventually be alloc= ated > > > independently in the future. And apart from dynamic allocation of des= criptors, > > > this is a nice cleanup. > > > > And the new descriptor doesn't bloat anything for zsmalloc meta size. R= ight? > > Please specify it into the description. > > Right, that popped up [1] previously but I'm not sure if we had a definit= ive > answer. > https://lore.kernel.org/lkml/20230720071826.GE955071@google.com/ Oh, I thought I did, maybe I missed it. Let me explain it here, it does not bloat the struct page: > static_assert(sizeof(struct zsdesc) <=3D sizeof(struct page)); Otherwise the compiler will complain. So with this patch series, it does not bloat the size of struct page, nor allocates additional memory for zsmalloc. Will add that in the description of the next revision. As Matthew pointed, in the future struct page and zsdesc may end up being shrunken and separately allocated. What this series does is only separating definition of the descriptor (but still overlaying struct page) Thanks a lot! -- Hyeonggon