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 EECACC433FE for ; Fri, 4 Nov 2022 23:41:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 607E06B0071; Fri, 4 Nov 2022 19:41:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 590886B0073; Fri, 4 Nov 2022 19:41:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 40A2A6B0074; Fri, 4 Nov 2022 19:41:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 2E3D46B0071 for ; Fri, 4 Nov 2022 19:41:02 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id ED09914064E for ; Fri, 4 Nov 2022 23:41:01 +0000 (UTC) X-FDA: 80097382722.05.78A29B9 Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by imf21.hostedemail.com (Postfix) with ESMTP id 94C251C0002 for ; Fri, 4 Nov 2022 23:41:01 +0000 (UTC) Received: by mail-pg1-f181.google.com with SMTP id f63so5659102pgc.2 for ; Fri, 04 Nov 2022 16:41:01 -0700 (PDT) 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=KNzgIEAgfWeeZ+vYlyj7j3dlBGeECygxdNOGMxY6Yqg=; b=Kp1TgF1QutdsH1sgEuD8nM/a1JFXpggJoWxJC/HioGIRzpscqHVBcdtH4JVSNgVDN7 51qwRVlnZK+CF4Zc+vRfa6lLuUWxFhtsTKXifPrsjJpSlgjdudvanpyZ77N1ODeayHY7 OhVAS2tUNNV3oSQQDYegpABmOHpjIbI8FF0JZ3aME6oGdWpoqqgVXHNn/U3234t5OcRD kNJb9Pu08WBJPORqUTB80hn6/I9KQ8QRV0oAOAJBvVFuzW1/yJdf8yvmwT0XeIvmfO5O wSuwyW0z0AWyTccbPN7yuPFo2y66Wi3th2oTm4inkrOjM4e6IbTr62n5B1koiJPVgGeB n6BQ== 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=KNzgIEAgfWeeZ+vYlyj7j3dlBGeECygxdNOGMxY6Yqg=; b=G6iNEnel4fase14mVVfaLykuCRbSbPYx/XqSuTUxZu1GD4zLtRBe9Uxh7mFZq9pjUW DwKwj0odwLbhgK4w7BEMhxQXit/ZqJuE1Nlcya7B/n7R8YweaYttz7su8kV++9WLc2Uc d6e0XbGaMluonGaYi3jlrhzMYeIuL1vFeFybSZ4nuKLY8Hh8X09vKMxrEkkaxYdsKzXY JH4god2bEA6XZzeXS08UjY4aRWu3dLwNI3ynv+y8IOSqbUpoHMB+O45Z/PF2FfRZx1Hm eYronCcBmTqOVR+RnJXYu3ep2kENvUeLbRySWqrAur/OnXt58oj13WwbdRHtUN4uGNi9 Dt0A== X-Gm-Message-State: ACrzQf0oHkfKHiiumsW5VOedfFmnPBD87u6eAlzZZfCqh+HCDdhFkWcr 7qZGwQzwTBwsPXt3Iw3YeSg= X-Google-Smtp-Source: AMsMyM4vPmVa+nsFujJmUrGtJlX2BmdjFvnTbT0UNeqQSDJK9BseigJIBheq+gPYKLbBXfaxdoVH6g== X-Received: by 2002:a63:1f0d:0:b0:464:69f8:1cbc with SMTP id f13-20020a631f0d000000b0046469f81cbcmr33077640pgf.574.1667605260459; Fri, 04 Nov 2022 16:41:00 -0700 (PDT) Received: from google.com ([2620:15c:211:201:755f:cdcb:1bd8:5ad8]) by smtp.gmail.com with ESMTPSA id q17-20020a17090311d100b00186b5c1a715sm283857plh.182.2022.11.04.16.40.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 16:40:59 -0700 (PDT) Date: Fri, 4 Nov 2022 16:40:58 -0700 From: Minchan Kim To: Sergey Senozhatsky Cc: Andrew Morton , Nitin Gupta , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv4 2/9] zram: Add recompression algorithm sysfs knob Message-ID: References: <20221018045533.2396670-1-senozhatsky@chromium.org> <20221018045533.2396670-3-senozhatsky@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667605261; 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=KNzgIEAgfWeeZ+vYlyj7j3dlBGeECygxdNOGMxY6Yqg=; b=FTFGtpRUjEAODciHEMnH0SGq6U+MLALZAVFHt0UueKBPb15h0aev3vPl2oVq6u1LCNgb2S YBUWSkESLo+KSLvwplLSFP4Cfmz+4uZ3MvzUacyyzbBK5Y8VdW7HN90BL4ubywQkhPmuSH jlctXGbDH9wgZu4A43H7VxN4gZJTVJc= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Kp1TgF1Q; spf=pass (imf21.hostedemail.com: domain of minchan.kim@gmail.com designates 209.85.215.181 as permitted sender) smtp.mailfrom=minchan.kim@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1667605261; a=rsa-sha256; cv=none; b=bI5Qt3N4YxfsH3ymqIyVglGn4GiqQxWNemLXHpfUXEIzlL3wiGTWPC5a+3I08Af/iwJUKx vO5LW66m9Q0UQ3fMnrvRda2DcvwbJRudX8EkEhAFkgjG0EIdN5rsu/UvLMJDdtpo6iF+JW nVqWV42sWYIMwm49i3SxOUOlXqXu0Wk= Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Kp1TgF1Q; spf=pass (imf21.hostedemail.com: domain of minchan.kim@gmail.com designates 209.85.215.181 as permitted sender) smtp.mailfrom=minchan.kim@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 94C251C0002 X-Stat-Signature: 1hhi8xss9a8bc4ugkyaatfpi56h5exsm X-HE-Tag: 1667605261-483921 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 Sat, Nov 05, 2022 at 08:25:44AM +0900, Sergey Senozhatsky wrote: > On (22/11/04 09:34), Minchan Kim wrote: > > > > > So, as far as I understand, we don't have reason to add remove_recomp_algo > > > > > right now. And existing recomp_algo does not enforce any particular format, > > > > > it can be extended. Right now we accept "$name" but can do something like > > > > > "$name:$priority". The only thing that we probably need to do is rename > > > > > recomp_algo to either add_recomp_algo or register_recomp_algo? > > > > > > > > Yeah, I like the name and priority format. > > > > > > > > Only question is how we could support algorithm selection change > > > > under considering multiple secondary algorithms. > > > > > > So what I was thinking about, and I'm still in the mental model that > > > re-compression is a user-space event, just like writeback, extension > > > of recompress sysfs knob with "algo_index" (or something similar) which > > > will mirror algorithm priority. > > > > > > Example: > > > > > > Configure 2 alternative algos, with priority 1 and 2 > > > > > > echo "name=lz4 priority=1" > recomp_algo > > > echo "name=lz5 priority=2" > recomp_algo > > > > > > Recompress pages using algo 1 and algo 2 > > > > > > echo "type=huge threshold=3000 algo_idx=1" > recompress > > > echo "type=idle threshold=2000 algo_idx=2" > recompress > > > > > > Maybe we can even pass algo name instead of idx. > > > > Let's use name rather than index. > > OK. Any preference on the keyword? "name="? "algo="? "algorithm="? > "compressor="? "comp="? > > I want use the same keyword for recomp_algo. I sort of like "algo=", > but not sure. +1 with algo