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 C2233C433FE for ; Thu, 10 Nov 2022 22:44:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2DA696B0071; Thu, 10 Nov 2022 17:44:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 289F16B0072; Thu, 10 Nov 2022 17:44:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 151C76B0078; Thu, 10 Nov 2022 17:44:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 06A686B0071 for ; Thu, 10 Nov 2022 17:44:26 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id BA734AB8A1 for ; Thu, 10 Nov 2022 22:44:25 +0000 (UTC) X-FDA: 80119012890.18.DDAB8B9 Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by imf07.hostedemail.com (Postfix) with ESMTP id 683B74000B for ; Thu, 10 Nov 2022 22:44:25 +0000 (UTC) Received: by mail-pg1-f179.google.com with SMTP id 130so2939148pgc.5 for ; Thu, 10 Nov 2022 14:44:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=LuSKrl+/DV5Kj4welJmVDK8XOamSFjC5ydfR3wdWhcU=; b=nesWlNg6phzKngSp4sCx7/sF3vGW7h63W0IURGzR1Xjy4EQPpEMaC4d9lchWGizDU4 OxAMm/ZBTwTwTKz1Rki4j815EMVa0uvOSDKXtK68D8YsJ4OyuUqbanVTNQoipTMHCAhw vVANyA7GzNRWY8iqZ5xK4K0Cfz5JjcHVb4VWxfAg7MvsJ4sqgoqSOUqZ+7i/dAS2jukX s/XJe4C5rGw1sJTk1oR+q/1EDU69yN06QixBRhFp9DWs4bYlsh1pDYdHbEi7YZdCPv3M n3HnqjqHPMcylqrlg7MkWqCFrZhpA7TAf4Om3Q1dLwQUMfdMMeOYT6Cwbjerl7H1n4lV oLgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=LuSKrl+/DV5Kj4welJmVDK8XOamSFjC5ydfR3wdWhcU=; b=lzLpHufLzBufzkUPDUlUgVORaJjdgKEKJSj4O1PF7RuRkiap+M2qy34hqjH0MkQodi rMalbg6cSicReV7tI0yud+yBstyyqRT87nNYMTRMsFpM+rc5MsliqkpN7nduu/EqhUUH WjmgkFXOzR4QPZvzJNRB6BYqCk4vYT1xg264l4pVWJv59Moa751NGFYyiFzZto0gYC8t 0bbwGDIZyJBLfnckkl38XHAVgqEDz99YlGis8lywJHX4M6DjV9/jmrIqhX4Tz3oiSgDF 6JLHs3BCnPyf/lJ9mW540oJ1m+/b/BNBiK0o3TobdYBWCMpJfpY7HP1PbP3jSAZ1a7nB /cFg== X-Gm-Message-State: ACrzQf2XRUjttsGNewWmJXRWme3mZ+O0IyYejW2TAeEWt7oka4KJbNLt e1ZoaaW/d4WasW+9JMYCRVc= X-Google-Smtp-Source: AMsMyM5ZlSfxNkT1wVmc6LzBzQEpADhgMFuyx8d2PgN/uZc+KwMjCEbWZw0xeb1TP2N0EJQB632OWA== X-Received: by 2002:a62:d401:0:b0:56b:676e:1815 with SMTP id a1-20020a62d401000000b0056b676e1815mr3880392pfh.66.1668120264246; Thu, 10 Nov 2022 14:44:24 -0800 (PST) Received: from google.com ([2620:15c:211:201:8c0b:3260:c81c:119d]) by smtp.gmail.com with ESMTPSA id q9-20020a170902bd8900b00180daa59314sm198221pls.125.2022.11.10.14.44.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 14:44:23 -0800 (PST) Date: Thu, 10 Nov 2022 14:44:22 -0800 From: Minchan Kim To: Sergey Senozhatsky Cc: Andrew Morton , Nitin Gupta , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv4 0/9] zsmalloc/zram: configurable zspage size Message-ID: References: <20221031054108.541190-1-senozhatsky@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221031054108.541190-1-senozhatsky@chromium.org> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668120265; a=rsa-sha256; cv=none; b=ML75xVkX2SJsosSsP7xpNm5/RwYzxLUjXM1fTbJJw8hss/yHbnKS5MH79VekiVTLlDRpjT ryqSjnriun50eNqM20IJUy3nmPQuj3XpiOzrdpLsWy40AH2NFHWR2E7SXhy4zswj95Qehe xrZvH+W7IuYn8t3YBPL0W0cQk3+jWfY= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=nesWlNg6; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=pass (imf07.hostedemail.com: domain of minchan.kim@gmail.com designates 209.85.215.179 as permitted sender) smtp.mailfrom=minchan.kim@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668120265; 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=LuSKrl+/DV5Kj4welJmVDK8XOamSFjC5ydfR3wdWhcU=; b=qF6PJ/ruDYgV3VW2B4PqCT1n+FsoqUojXFaBM6yJviQ9K+KPYaq6S9Iv29jGunhivFR5/Z Mk+JoNz7cXP1BV9UtHu7JO1KXwbcIgj57rC5613zeURQOPafbHoHmOzMlnJlkeBlEs+3uj 71LV1s2m4H95may9lrjdO+DDIjPfhPc= X-Rspamd-Queue-Id: 683B74000B X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=nesWlNg6; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=pass (imf07.hostedemail.com: domain of minchan.kim@gmail.com designates 209.85.215.179 as permitted sender) smtp.mailfrom=minchan.kim@gmail.com X-Rspamd-Server: rspam06 X-Stat-Signature: tcq1ksini3sped788jo3bmbmex36efwb X-HE-Tag: 1668120265-182487 X-Bogosity: Ham, tests=bogofilter, spamicity=0.015845, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Oct 31, 2022 at 02:40:59PM +0900, Sergey Senozhatsky wrote: > Hello, > > Some use-cases and/or data patterns may benefit from > larger zspages. Currently the limit on the number of physical > pages that are linked into a zspage is hardcoded to 4. Higher > limit changes key characteristics of a number of the size > classes, improving compactness of the pool and redusing the > amount of memory zsmalloc pool uses. More on this in 0002 > commit message. Hi Sergey, I think the idea that break of fixed subpages in zspage is really good start to optimize further. However, I am worry about introducing per-pool config this stage. How about to introduce just one golden value for the zspage size? order-3 or 4 in Kconfig with keeping default 2? And then we make more efforts to have auto tune based on the wasted memory and the number of size classes on the fly. A good thing to be able to achieve is we have indirect table(handle <-> zpage) so we could move the object anytime so I think we could do better way in the end.