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 8EDB9E64AAA for ; Tue, 3 Dec 2024 13:58:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1DBD36B0095; Tue, 3 Dec 2024 08:58:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 164EA6B0096; Tue, 3 Dec 2024 08:58:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F20606B0098; Tue, 3 Dec 2024 08:58:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id CE6986B0095 for ; Tue, 3 Dec 2024 08:58:56 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 890F5AE520 for ; Tue, 3 Dec 2024 13:58:56 +0000 (UTC) X-FDA: 82853803242.08.59406AC Received: from mail-yw1-f170.google.com (mail-yw1-f170.google.com [209.85.128.170]) by imf26.hostedemail.com (Postfix) with ESMTP id 8A232140016 for ; Tue, 3 Dec 2024 13:58:44 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=nSzMhFks; spf=pass (imf26.hostedemail.com: domain of seakeel@gmail.com designates 209.85.128.170 as permitted sender) smtp.mailfrom=seakeel@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=1733234324; 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=82D8O0HOv8JGic0DdXIn0oOsVY3gzgfEUZJmdO7wrkQ=; b=Q5h5Kh1nsc2GTUQTPH1AUPvE+HCzM5aYzAEEh/LguXSyHQ+fW7FBj3lCxlDqk0Q87Sp+Kw hG8TXd2XpuosrCjKyrEyl5Zwv3Gufaurhr/D/O3q834vd140LP3M2Ce4le+Se5UagdTYXa 0vfu66aC/0u5d6+iUOF9V/NvELm8+AI= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=nSzMhFks; spf=pass (imf26.hostedemail.com: domain of seakeel@gmail.com designates 209.85.128.170 as permitted sender) smtp.mailfrom=seakeel@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733234324; a=rsa-sha256; cv=none; b=nScqwg9YkPiJcX/ucz826ztj0YPwpraGgTIVom1k3ggFx0VNvn9jm9YyySjdEQ6dWipm14 ONOxS+mOUzfVhshsz09LzrU5jNSuXjOwUrGEUh/ItXSQIcIwhanecuwtuVYGhDXYXEwMPB Yqiiwt3mJcE2/5RMxc6ehwjGxOM5FK0= Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-6ef7f8acc33so26448927b3.1 for ; Tue, 03 Dec 2024 05:58:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733234333; x=1733839133; darn=kvack.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=82D8O0HOv8JGic0DdXIn0oOsVY3gzgfEUZJmdO7wrkQ=; b=nSzMhFks3wcmvqUC07qiWRYOkxoBf32ohJyyZE4DBJFAZG8uZaL+jUGnD4gR169uRv 5aJOoTVa4pDjKRxRETjf+sDDWoQQ2Gr55hx5Y8ySl4Gh6pRAbSD9UK1sNiYtNWLbhg2l FPed9VdULCEGEK1zmI3NcZ/LjhglLMWbZYRU1xv1qmn4oiqxvw1tG2CV55FrStKutXA/ WelyY5VcL0jkB+i8FS2TW+Wb+cpBrgwZVraIXHuxH8pc0t3Evi+RZ6hY3XeuCr5O+Y+B pcFsZtptSwNCMoh9JtXDf/tAuZumY4hWV3hOesxY8ubfRyQPROu7s/dRwrskDCTMkSzy EhOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733234333; x=1733839133; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=82D8O0HOv8JGic0DdXIn0oOsVY3gzgfEUZJmdO7wrkQ=; b=DvviY+m/2UgaAevdMbH9yweyhiP6RlLZciccEMjlKAiN8MdPRTqmDbmtLdHom5Vtum 4MMuDfFkUvcKMfEgyHStYuL75Vy9zhk22J1O2u625JPirIoLZNzrjCiEP3IIVl1Ptsq1 9B+2aLZBJqLGenfVIje7HKCPVWJ2//KOSLQLvH9SNYRbH/FkelXTVupV4Th/Jvtc1+oP NxyiwjQvC8oVKzu/ajMS/6+w/qQwwQSG9cZUvlRsBT6kzFbLH+kEkoHbuRwh/E3KfzRw Sy524CQeQP5FJ6dZ8k2+H3Sf7IvCXz42EfF6sLswy36SioAqIbt6BTdR7odoyoLaQe1c l7pQ== X-Forwarded-Encrypted: i=1; AJvYcCWJp4dMJzZhgLMZ/UTnQxKoRWVobtj7lhQVxZVxyOlCyvtv+naj8Mnq88aPzLUC3blCxwGmil0XTw==@kvack.org X-Gm-Message-State: AOJu0YzCMJom+ahUmdL6g0+bwfSfoZvXyJyH8dDI4xGH+gzLn9TloOVa 72quKo9+b4ky6liv88KDtb1GRHuiMqnrkQJt657Ki6XvuIUxHafJ X-Gm-Gg: ASbGncvyAdmQKIYaYq+AOUTyo/ves2cq8qcag1CF8KZ8ckfeGVbzQt8Br6fZwRNioH9 M++ZbAfS5YOWIJHDnOlSA5X75SWBY0mFc20/Ttz77fYtLXm2elSn3ez8lyXWFOb5h1vx3IdBp6M vMj1b3JQ5dPX1E1LNrpOWfZcEXNrWe/1VJL1OdFCga2kBrlMVHYx9/weeE64O4hkI3LD32mGVlX THAAMtNekhj+mBeigtgExDJj3/v9MfHr6YQLMN65VFZ1ULCL9CWAw== X-Google-Smtp-Source: AGHT+IFapS3M8R2hWUiWN5geS60S69v4zurEsMeAIaVtBWniw/Z1YZ7i7lR0HSh4L77K1qboyR8LPA== X-Received: by 2002:a05:690c:6e13:b0:6ef:a4ec:f698 with SMTP id 00721157ae682-6efad17804cmr34473667b3.3.1733234333625; Tue, 03 Dec 2024 05:58:53 -0800 (PST) Received: from [192.168.2.226] ([107.175.133.150]) by smtp.gmail.com with ESMTPSA id 00721157ae682-6ef4db290f3sm27377887b3.20.2024.12.03.05.58.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Dec 2024 05:58:53 -0800 (PST) Message-ID: <8f87ec15-9aaf-47bc-9255-5a6ee721552e@gmail.com> Date: Tue, 3 Dec 2024 21:58:42 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 00/21] mm/zsmalloc: add zpdesc memory descriptor for zswap.zpool To: Vishal Moola Cc: alexs@kernel.org, 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 References: <20240902072136.578720-1-alexs@kernel.org> <0a10e61b-f0e6-4423-996c-7884c93af65f@gmail.com> <66d8bd3e.170a0220.18832.0206@mx.google.com> <674e1324.170a0220.377d6f.b6ed@mx.google.com> Content-Language: en-US From: Alex Shi In-Reply-To: <674e1324.170a0220.377d6f.b6ed@mx.google.com> Content-Type: text/plain; charset=UTF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IdNElwrMbfIEba2rP4cdeDxrMa0PbWu3Az15Whap8ECyvvR2BzoYe A35cbb7q BkpYC6fKCjnvNMBjfcu3ytufUdgl5tgU+8e6xAbmiNrm0/g0KL9mDbywzAm22c0fZQUTt9N6Tc3YftdHw63MflYc06OdXJjLnCsyPxkVHew+/tk9iLdqmbhnlReLJhy/CcIRvZHAQBW/ujboJlvnKejA6caLB+yLQ38913MVkRia2PGtTpYF+cV0CBdv0sWUlO319AjS9x9B/GO2x3MzRNgtPOmfAW1d+UQXMazsgJnTkFzhikNaj0l9gNc4DfJx0Ru6zXN5dEYvPm3QSM9KhfGiKzzm2hutH5DuEPx1RLtraKUzUu24bXT5Av7V+NuedgrKU14403lqIX2BfZgD5a8NpZIQwOP6+Iw5aKTskW+A+Kbtl+jE6Z4UsRDX/jaidtO/ChNuKQXc8i/S+wJfVgzEUe30FAg0eISOpeSHaJhUVviWAJy58Of6nijk+IFoTSbvYuwtl6eL9Za/cGkmmzjU85VhgYRnxciE6hiczZFEVhWNdO/J/muUecg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000012, 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 12/3/24 04:05, Vishal Moola wrote: > On Wed, Sep 04, 2024 at 01:04:11PM -0700, Vishal Moola wrote: >> On Wed, Sep 04, 2024 at 02:54:14PM +0800, Alex Shi wrote: >>> >>> >>> On 9/2/24 3:21 PM, alexs@kernel.org wrote: >>>> From: Alex Shi >>>> >>> ... >>> >>>> >>>> This patchset abstracts the memory descriptor used in zsmalloc by zswap/zram. >>>> The descriptor still overlays the struct page; nothing has changed >>>> in that regard. What this patchset accomplishes is the use of folios in >>>> to save some code size, and the introduction of a new concept, zpdesc. >>>> This patchset is just an initial step; it does not bias the potential >>>> changes to kmem_alloc or larger zspage modifications. >>>> >>> ... >>>> >>>> Thanks a lot for comments and suggestion from Yosry, Yoo, Sergey, Willy >>>> and Vishal! >>>> >>> >>> This patchset could save 6.3% code size, and it's a nice abstract of zsmalloc >>> memory usage. >>> Is there any more comments, or mind to give a reviewed-by? >> >> Please CC me on future versions. Most of the zsmalloc conversions seem >> ok, but I'd hold off on further iterations of the descriptor patches until >> the maintainers decide on what/how this descriptor will be used >> (i.e. our end goals). > > I apologize for leaving this in limbo for this long. This patchset is a > prerequisite to shrinking struct page, so we should get this memdesc in. > > I think it's safe to assume (since we've heard no definitive goal from > the maintainers) that in our memdesc world we want zsmalloc + zspage to be > similar to how it currently looks today. > > Would you like to rebase this on the current mm-unstable? I'll re-review > it in case anything changed (and can then give you my reviewed-by). Hi, Vishal, Thanks a lot for the review and kindness, I will try to do the rebase in this weekend. Cheers! Alex > >>> Thanks >>> Alex