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 EF7E7C4332F for ; Fri, 11 Nov 2022 02:21:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5921C6B0072; Thu, 10 Nov 2022 21:21:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 542E98E0002; Thu, 10 Nov 2022 21:21:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 40AD08E0001; Thu, 10 Nov 2022 21:21:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 2700F6B0072 for ; Thu, 10 Nov 2022 21:21:00 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id F3536A139C for ; Fri, 11 Nov 2022 02:20:59 +0000 (UTC) X-FDA: 80119558638.24.DA0800F Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by imf18.hostedemail.com (Postfix) with ESMTP id A2C731C0003 for ; Fri, 11 Nov 2022 02:20:59 +0000 (UTC) Received: by mail-pj1-f44.google.com with SMTP id d59-20020a17090a6f4100b00213202d77e1so6568190pjk.2 for ; Thu, 10 Nov 2022 18:20:59 -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=6i6KL/hpCXNpABcruUBMYgjhMEOWPp+uaTBGW7BZZY0=; b=p4Srq9BBF4Qsrt/CuzRJBQkh5eQA5tPR1+jjoQrvDqTUUJEBTsvAxXGF5ig3NXj94w fryCSn6ORHHw/kogN1q7mRYNttBjmOMqMaTw3dtRX8d1YeTLZHNN5a1VRyH7eW6GwYDh Lnd1+l1gbVI8yh74zc/yxpk25gQU+WgADZbhkXThJPuDVhU6dDfPKbqObbY8AUJ3Mpm2 10kStfYX6wjhKuEKfE8iCV897VELM/J//g2nnLfho5+aNAVHBjgxqycx+M1e/idNOeKS ehEDGtPQEBKEjZQ7TU1JbXdJ0lzd1G77hsgPcWayzP9eAPNWTfNW6v0KvoHqfBQHUf9v VBtA== 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=6i6KL/hpCXNpABcruUBMYgjhMEOWPp+uaTBGW7BZZY0=; b=SoiDZdCRJHV433epG31fx4NtLBHhcj7+t3TiXRjPkGq8E6R+9s+SaivXCvNReJOtXG WFjCON8pYupsRK1OX4bOrvoo8QGCcdcvDkoa6owlSgdJObSziEL6etGR5GFjxk5Jjs/M JMmUPz9cCT7ICaKibh2ScA0XoONBWCvzVGzXDtfodol7k+c04uUdJcjQP3zcznDxKl/i EaqanUd2WaQNI592uF+LcCCugs4HxRIIbrNJkYuwHygjUiqvLDGOeKMtSMZaVQlXRelt NdTnBov8MiLyQUNNu4MuJiyRll5AW0x10V7r+/RlZ3k7+QwYMEm6cyzKvEiZoDdKCZWy w0tg== X-Gm-Message-State: ANoB5pmxi+UQED6Ud5bdzDNS6jqT05o7AkKiviD8LrVh04k+rm+OUQuP gHpC3pHaEFMXI5WweYnb6bY= X-Google-Smtp-Source: AA0mqf7Aj6fFKusF+WM23rFan6S+RRVt19RQy8IRcWuOnINtT7AYSKlD/gssvyUyQWrjaiHH0gchYQ== X-Received: by 2002:a17:902:7c97:b0:186:91fa:59cc with SMTP id y23-20020a1709027c9700b0018691fa59ccmr468005pll.44.1668133258545; Thu, 10 Nov 2022 18:20:58 -0800 (PST) Received: from google.com ([2620:15c:211:201:8c0b:3260:c81c:119d]) by smtp.gmail.com with ESMTPSA id y17-20020a17090322d100b0017bb38e4588sm376597plg.135.2022.11.10.18.20.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 18:20:58 -0800 (PST) Date: Thu, 10 Nov 2022 18:20:56 -0800 From: Minchan Kim To: Sergey Senozhatsky Cc: Andrew Morton , Nitin Gupta , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv4 8/9] Documentation: document zram pages_per_pool_page attribute Message-ID: References: <20221031054108.541190-1-senozhatsky@chromium.org> <20221031054108.541190-9-senozhatsky@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221031054108.541190-9-senozhatsky@chromium.org> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668133259; a=rsa-sha256; cv=none; b=vIQVYSc26AW4zVF6m+XDV0WzZRHEo/fv04+RV+gxP69KBCH1yJ3+9YyumxpRvZ1lEkUW2z mo24Pkh2Q7jfQny5DjDiv2/hOtGd2l7gMcn7bC3cgdFBVYssDOM8z+l8Ps/6GXPvyMxjft ONfJYE0XznDkiJ/oLua13LYfdkn9GiU= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=p4Srq9BB; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=pass (imf18.hostedemail.com: domain of minchan.kim@gmail.com designates 209.85.216.44 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=1668133259; 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=6i6KL/hpCXNpABcruUBMYgjhMEOWPp+uaTBGW7BZZY0=; b=Drta2nXz9R1W3wCp0p+Sl1izbZ5RzzI//Jdz9PdWqo3wtxXBye+R4jfQ06Cg/DvDT/64Lx V5EeP7Vsn9wUN+1aUuXkYbXQ0P0RSd4QAo/pIK62PKT4SfSNAB4QCbbiLHXVDHjUuwRDYg TBvA/p1+PLtMHT1xjrfM5vJdxGUqIhY= X-Rspamd-Queue-Id: A2C731C0003 X-Rspam-User: Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=p4Srq9BB; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=pass (imf18.hostedemail.com: domain of minchan.kim@gmail.com designates 209.85.216.44 as permitted sender) smtp.mailfrom=minchan.kim@gmail.com X-Rspamd-Server: rspam06 X-Stat-Signature: pckmqohi8ihafejmg9hhzdgp7cdkdrhq X-HE-Tag: 1668133259-467658 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: On Mon, Oct 31, 2022 at 02:41:07PM +0900, Sergey Senozhatsky wrote: > Provide a simple documentation for pages_per_pool_page ZRAM > device attribute. > > Signed-off-by: Sergey Senozhatsky > --- > Documentation/admin-guide/blockdev/zram.rst | 38 ++++++++++++++++----- > 1 file changed, 30 insertions(+), 8 deletions(-) > > diff --git a/Documentation/admin-guide/blockdev/zram.rst b/Documentation/admin-guide/blockdev/zram.rst > index 010fb05a5999..4cb287520d45 100644 > --- a/Documentation/admin-guide/blockdev/zram.rst > +++ b/Documentation/admin-guide/blockdev/zram.rst > @@ -112,7 +112,29 @@ to list all of them using, for instance, /proc/crypto or any other > method. This, however, has an advantage of permitting the usage of > custom crypto compression modules (implementing S/W or H/W compression). > > -4) Set Disksize > +4) Set pages per-pool page limit: Optional > +========================================== > + > +zsmalloc pages can consist of up to ZS_DEFAULT_PAGES_PER_ZSPAGE (single) > +physical pages. The exact number is calculated for each zsmalloc size > +class during zsmalloc pool creation. ZRAM provides pages_per_pool_page > +device attribute that lets one adjust that limit (maximum possible value > +is ZS_MAX_PAGES_PER_ZSPAGE). The default limit is considered to be good > +enough, so tweak this value only when the changes in zsmalloc size classes > +characteristics are beneficial for your data patterns. The limit on the > +pages per zspages (currently) should be in [1,16] range; default value > +is 4. I think we need to introudce pros and cons for user to decide it since it's not familiar with admin. I think It would need more explanation about zsmalloc internal(especailly zspage and size classes)