Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp1234919rwl; Fri, 4 Nov 2022 11:20:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM68w0eKa8jEmR9UAsgbQpsb+W2OB9Y7WUN9ta1GUL1uv8ljZ5p5eclfi3TRuVyhEUlyjBtP X-Received: by 2002:a17:907:96a0:b0:7ad:960d:3a4d with SMTP id hd32-20020a17090796a000b007ad960d3a4dmr351116ejc.522.1667586058412; Fri, 04 Nov 2022 11:20:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667586058; cv=none; d=google.com; s=arc-20160816; b=lrW8vE9M0zPl7mKCp3h7TTzDNG3jeYiBOPakcpiocNsJUFGfX+h6ACQ97q54+wTFQC tJbREEW+kR0Qx/iAi31rMRstyh7K16io/j0SKk5WXYreyePjlk8QERlmyJwFCxrKNgux AbqFtfqyopnunQqwHjSM5SZkPe7AvM+3I/jnNVuvgjnH9t//mrZku/xz+n7wSAnhzixR E1+DvnWQNNtUjRMJKjWLmmslxXuDxCFk7QaxYTpGiU9DFhRwH/963p6s/zuXVis4/0rk tnKHoyyUksI2khqi6PLymTvKAuVoTYfozl/W6h3avF+qjaTNiNmZbjqnfWTLLU6iopXp nPSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=XrYnS8JhNYA90twtP47L3ZwTLaMR8mnWvEeKOdrs1f8=; b=QVxZebrl/a8SVpdOQxE4mLPOemvk9f/17haSxLW1DHiG9VQujVOQCnbn620qX85oQQ D3Vwb99pGFcdm6pD0PhlJpr6CWU4lfyUJhElqqcNkWdZZL+qvD3TPrjwYxGPUsDWtaAD 1pBQbK62A3Ws/kxCjJRs2sHp8udXlF6ETbhbHqsOR9H/qXkUw8eX13cGVkyk+hrFYVNv uVj569EIB8/M7YXdtxAe5UkCkc+kc2mulo0sWgcF59jqzZMobDmyXb/V8sgGKoZ276IR W65tKaOGV7SLBgxGxdeuAYNtBT3qyFIQQEg2+hNi8xCJcPX5+qfVFlgJv6BBwyQKOCZP PiuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qaYgQ7+1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb42-20020a1709076daa00b0073d71124609si5131386ejc.182.2022.11.04.11.20.34; Fri, 04 Nov 2022 11:20:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qaYgQ7+1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231918AbiKDRrs (ORCPT + 96 others); Fri, 4 Nov 2022 13:47:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231913AbiKDRrb (ORCPT ); Fri, 4 Nov 2022 13:47:31 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2E914B98C for ; Fri, 4 Nov 2022 10:47:25 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id j12so5556867plj.5 for ; Fri, 04 Nov 2022 10:47:25 -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=XrYnS8JhNYA90twtP47L3ZwTLaMR8mnWvEeKOdrs1f8=; b=qaYgQ7+1jZ1Kv2W+aHiz6Kyz3YuGKVJM0RtjnDFo2QSZasn3G8TGm+oQ58wjjeJVai 7Jft6TyegA/Rd5fZCMwfqe8/SNQU1uZN/FBEoB68vmgJZZ/wUP5FvHCSUZCgmOx6YE2q M42JzyglrT4gTBDnizSB/SRKAY27UUpzUoZGeq3yMU4FDp2EFspffIA3Uw93bdCLzlOr EsxBtdarf34/G2fFIdsyhZK/Vg8SLubX9iHokolm83NlNa3sQCBm9gS59W15zlAmWas9 71ynldxLFiFB9HNPfRV6qoLeP6dengYdmcvBYEfiBOLgNDzM4lPp/PEnp23u3DBzZW93 czSg== 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=XrYnS8JhNYA90twtP47L3ZwTLaMR8mnWvEeKOdrs1f8=; b=xxAqF1BTU/z+Bq2V7dOTGbZGs5//a/df9TW5BSleul5tS2ayA6hIHFpWRX8nJn3pSp rCW0paa+uoRwL5F09B4sMK6YVmziFumtcf7cv2okrG1pzUK7kG2tD46Q1NnwSQatu/s3 HjDfRIo9nGiZabVWFokq+gA+ktgqdFCCafpbubgPft8XALmaf57z/dKYiLvcf9sp1fH+ IwYVKhFfvSVWzVcy95K/igaZ4wEFtIKXxIPRbAZ3TBDuHy6HrootjBLQB8lbBTsTnjPF kG2gfDwIegvqZvAeCM9MBHNlsHUclW6W/OgGWI9mGeS9MjD39ofMY6L+zvBkALdr6o/+ SSmQ== X-Gm-Message-State: ACrzQf2sYaewP+pKEEYiPFbaL+LHxMt2gSfwabRtRFHYD4jORXlXRLZ4 SvF3Wzgj7+DPPF5iUY6fbBc= X-Received: by 2002:a17:90b:2393:b0:213:ecb2:2e04 with SMTP id mr19-20020a17090b239300b00213ecb22e04mr26271755pjb.100.1667584045165; Fri, 04 Nov 2022 10:47:25 -0700 (PDT) Received: from google.com ([2620:15c:211:201:755f:cdcb:1bd8:5ad8]) by smtp.gmail.com with ESMTPSA id t8-20020a170902e84800b001785fa792f4sm24852plg.243.2022.11.04.10.47.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 10:47:24 -0700 (PDT) Sender: Minchan Kim Date: Fri, 4 Nov 2022 10:47:23 -0700 From: Minchan Kim To: Sergey Senozhatsky Cc: Andrew Morton , Nitin Gupta , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv4 4/9] zram: Introduce recompress sysfs knob Message-ID: References: <20221018045533.2396670-1-senozhatsky@chromium.org> <20221018045533.2396670-5-senozhatsky@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, FSL_HELO_FAKE,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 04, 2022 at 04:53:13PM +0900, Sergey Senozhatsky wrote: > On (22/11/03 10:00), Minchan Kim wrote: > > zram->table[index].flags > > > > If we squeeze the algorithm index, we could work like this > > without ZRAM_RECOMP_SKIP. > > Something like this? > > Allocate two ->flags bits for priority and one bit for RECOMP_SKIP. > Two priority bits let us to have 3 alternative algorithms (01 10 11) > plus one default (00). So 4 in total. Looks good!