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 B0158C4332F for ; Fri, 11 Nov 2022 10:34:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3D5426B0071; Fri, 11 Nov 2022 05:34:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 35CC46B0072; Fri, 11 Nov 2022 05:34:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1FEBD6B0074; Fri, 11 Nov 2022 05:34:33 -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 106B16B0071 for ; Fri, 11 Nov 2022 05:34:33 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id DC5B51204CA for ; Fri, 11 Nov 2022 10:34:32 +0000 (UTC) X-FDA: 80120802384.06.DB0459B Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by imf28.hostedemail.com (Postfix) with ESMTP id 8900BC000D for ; Fri, 11 Nov 2022 10:34:32 +0000 (UTC) Received: by mail-pf1-f169.google.com with SMTP id 130so4545686pfu.8 for ; Fri, 11 Nov 2022 02:34:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=+i7NWs5ElLfzzgcx0B5LRq5KgAIbsYPPgqesylV99qc=; b=auN3/+xhoPmbbT5Jr5mgDseb2NtTdMDLZUkWZXoWF/BlKqtpqh23AhY6vlvK9tyhO4 TdgEl0NnEMzfzeperKZ/1cvHhOZ3lBDsui8JlcKcT8qkQycLUyTaMZ+Kjh2AS8Arlkuk 2ACGV9xL/yLpEnN3WU3AIxlcV89LiqyOvwh8A= 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:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+i7NWs5ElLfzzgcx0B5LRq5KgAIbsYPPgqesylV99qc=; b=C943F0SR7hBgV8vvkGaUaTEv0CZsljNPbsEV6zwvJtQM2Rt4FQ1kz3I4iVdukq0AYJ VciRBuubKOpNhcZiGxsqEvLzsiFdqnDvJEd/IO5rQ5M334yuOfAqmPAQXwrvaLnS3Tf9 my1bN7L+BxG0msTAa3gKeC9aA1YnQ/TM/9y2rm/PoSTX7n71OkpmUVPmS+PMlHv0MoXF GOsmdaKmxMfo/MaXHH9NJhwyWVTRNy/j3uZ/z9BDFbUg9l0l5N1LHzoJlGcY5SLtmyHZ nKBCu4zWDG+uCX1V5+jGF/qvDD80Xq+e30UtGRzUq+LIwgxRb+J9HQJf8niyiW2k8elt dj0Q== X-Gm-Message-State: ANoB5plAl+KcwiwVluocjFXqY+XduFwrOxRsstQKh8jiOAgyPvQd5ZR4 DIXAF9LZIY280vdqOBoSGSoRDA== X-Google-Smtp-Source: AA0mqf48wRyFzQ1BYVpCEzg1z170CYhJdr8bvcAEjXyKB6FFAoNXQoJROj6OOCBhq7yDaKmXSEA5fw== X-Received: by 2002:a65:6107:0:b0:46e:d2ea:1417 with SMTP id z7-20020a656107000000b0046ed2ea1417mr1173842pgu.0.1668162871558; Fri, 11 Nov 2022 02:34:31 -0800 (PST) Received: from google.com ([240f:75:7537:3187:8d55:c60d:579d:741c]) by smtp.gmail.com with ESMTPSA id t186-20020a625fc3000000b0053e8fe8a705sm1311733pfb.17.2022.11.11.02.34.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 02:34:31 -0800 (PST) Date: Fri, 11 Nov 2022 19:34:26 +0900 From: Sergey Senozhatsky To: Minchan Kim Cc: Sergey Senozhatsky , 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: ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668162872; a=rsa-sha256; cv=none; b=48CFdKK252glq/MmfvtTs7hgwcWrOO+MhPjhx1IH+lM0Wtfs8qu5VHZVpeN3vZigrMkYnj IWO8scug/gBiq8T8cEWyDemSJGxzAXysdHp3iFjdocY87shJ8GS5q+KC9T8YeGKe3DSwCF LvLRFRv/z9OgNe0BbDdXRVNTryLPmSY= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b="auN3/+xh"; spf=pass (imf28.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.210.169 as permitted sender) smtp.mailfrom=senozhatsky@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668162872; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=+i7NWs5ElLfzzgcx0B5LRq5KgAIbsYPPgqesylV99qc=; b=d1iaFl/ITMIcYRUqLzCoec9+4cQyCzE5eq5I+AcwCSTyxhY/yh5GuoHhAxp4xtPsyWwaOh g/nwNbdvw99KHIUchZUo6seJVm+bXnhJsJWRJoLC4Rrgk7JViU/8GBzZpdBg6592jp0LZ2 fr1IvSboyGa6Rq2FhX3GvgZAVSXCUSg= X-Stat-Signature: csuzsrn1xjr479zpazebgpgu8xis4kjm X-Rspamd-Queue-Id: 8900BC000D Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b="auN3/+xh"; spf=pass (imf28.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.210.169 as permitted sender) smtp.mailfrom=senozhatsky@chromium.org; dmarc=pass (policy=none) header.from=chromium.org X-Rspam-User: X-Rspamd-Server: rspam12 X-HE-Tag: 1668162872-261209 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 (22/11/10 18:20), Minchan Kim wrote: > > 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) OK, agreed. I have quite a bit of info in the 0002 commit messages. I can copy-paste some of those bits and edit them. We also have some info the internal doc, which I can also use as a "source of inspiration".