Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp435905rwi; Wed, 2 Nov 2022 13:45:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM733Wrh95GXDcD218aOv3m73uUM3tHHLHN9M6u7Vw80UyUqjhoLSdC6SvayjokJbTMitdgk X-Received: by 2002:a17:907:a07a:b0:7ad:88f8:7ed9 with SMTP id ia26-20020a170907a07a00b007ad88f87ed9mr24768211ejc.579.1667421944270; Wed, 02 Nov 2022 13:45:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667421944; cv=none; d=google.com; s=arc-20160816; b=LYa+bvdCTqVas4J7AEKBCs5miWu7BI9lHVxPhbxDbVhWN/xu1nik3nrm8wCKv+8gsw UBWODPgHjFGzJzmon8BplWWc35fV+Xe0eH3EGXhFUW4+CHV84E9q37rYmaiKR3EuZfr4 MZ1bn+rb8hLO1Z/TsB+cWIlTEkCvdPoWxF4i6A7SJfbijdJwC239bQMG6YLLsan5zEMe s8fxXmCIi5Xv7SLPsILRCGSu6bHt6UONaYBCyQtaWszieB7T/5HuZchc2UqG42LpCHkm ikIYRh1CEPvrt6fqIEJTJXOpjMXAW5Swumg29UDpZQMgy6+/W1bARD+MbBOB8jLGlXoW ylPg== 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=moK7+sMOMULoftfZaVBsMzmR/Xim4ClEpYiki4yAnI4=; b=IXrmDn4/0IPOz8od6sPV0PuM7QcwrHKALghCO2B7f3MhJGVYteemL4HH3Bye/mr7nI 1ZJgpUOXSJiccGwooQGPXgDwH/qCgPqPqK3IR07zbex2CXCTtvw8COLO9BEsiZhC72lE U9hKEvh45fW3t2fctLMrjWsFGCb1C2X5iti3uzIpyJGsFnh52L3YzJZXsxULZl4hjKQk VO+WhXBIWCvggF67Ju1ydWuG+rAp+D5iV3NJ7HhOI4uyX6OSpeu1daHW0tBJU4mMQxB8 0w713AdVj+50gptIHxYaIZ/fmXQ+3A7OQaND8orQFoOT8hozb4o8aN7S74PxN6JazHRQ 2JGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QVTusBD2; 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 tl2-20020a170907c30200b0073cd848ae8asi11805246ejc.321.2022.11.02.13.45.21; Wed, 02 Nov 2022 13:45:44 -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=QVTusBD2; 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 S230381AbiKBUHd (ORCPT + 98 others); Wed, 2 Nov 2022 16:07:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230380AbiKBUH0 (ORCPT ); Wed, 2 Nov 2022 16:07:26 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92FFBF2A for ; Wed, 2 Nov 2022 13:07:25 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id o7so14073779pjj.1 for ; Wed, 02 Nov 2022 13:07: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=moK7+sMOMULoftfZaVBsMzmR/Xim4ClEpYiki4yAnI4=; b=QVTusBD249bMzTQ9oIKcVcRv33b8XOmbDsu+5EeR+ZxLFUKXIdLu2aQATF8dD9wHBy F8egS+d8AWjVWHrazF+8DJmVooLbv8fsf9FLhvMRMQyaxSv9pV0rQLkymIDo0ox5goYU 8aIN/LKcGwKFGgRX0Y7SSonK/vd/3zYoc9JM10krebizr6ttM5llr7ZQBmItJk+67Wu4 aS5RQrJhJvTgK2kTj1Ys47j24+qHYsLztyszSTgdMby0Zr22WMFz3yXdnym7YzWAHAMZ n+Emg/uQCK3GpVtXbA4fTGpvWfhUVC4PvX1JdTBHeAhZC9+ebMWoSUhzqjHsbvfL0FlU efKQ== 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=moK7+sMOMULoftfZaVBsMzmR/Xim4ClEpYiki4yAnI4=; b=rvO07FY7A0BYpi/jXIAUX2XRxGHP08uiJY712+DiSRrpI2wsc/UE+RMhm9st/rDNaQ s9a0R19P82v8zQbRbbPwRaWXWbGLLGctn4QPjgpyg8gRGGo2leudJz84zgdiHX3Nj/as knRy4ATPWvraWCuiqXgYsSoIMzNpp28aEMc+Exm03x1uuxjx8cAL8iQ2WYZYV3755nuC wAa4mPDwY93rvbeMpCn3UHLeDG2UTfPE6TNS9e5Wxxm4tCV4BX2N8BUzvQ4Mky6ril5Q RYzYbD3NEXN6ckJFLbX4qzrSlk9Oyn+ZDm79l/GdG3qRuV08WS2IKxKBEsElQH0eyNfH J5QQ== X-Gm-Message-State: ACrzQf2hN81MBMx757gmxv080U7nflQ8+dHNGjCfFqhs3ZbVyYKTn1+W 0wVcv2GVhFwIyFMtaWroesk= X-Received: by 2002:a17:902:7598:b0:178:3f96:4ffc with SMTP id j24-20020a170902759800b001783f964ffcmr27343250pll.53.1667419644927; Wed, 02 Nov 2022 13:07:24 -0700 (PDT) Received: from google.com ([2620:15c:211:201:3fd5:8614:6eb0:846b]) by smtp.gmail.com with ESMTPSA id jc13-20020a17090325cd00b0017f7e0f4a4esm8701928plb.35.2022.11.02.13.07.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 13:07:24 -0700 (PDT) Sender: Minchan Kim Date: Wed, 2 Nov 2022 13:07:22 -0700 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] zram: Support multiple compression streams Message-ID: References: <20221018045533.2396670-1-senozhatsky@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221018045533.2396670-1-senozhatsky@chromium.org> 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, 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 Tue, Oct 18, 2022 at 01:55:24PM +0900, Sergey Senozhatsky wrote: > Hello, > > This series adds support for multiple (per-CPU) > compression streams (at point only 2). The main idea is that > different compression algorithms have different characteristics > and zram may benefit when it uses a combination of algorithms: > a default algorithm that is faster but have lower compression > rate and a secondary algorithm that can use higher compression > rate at a price of slower compression/decompression. > > There are several use-case for this functionality: > > - huge pages re-compression: zstd or deflate can successfully > compress huge pages (~50% of huge pages on my synthetic ChromeOS > tests), IOW pages that lzo was not able to compress. > > - idle pages re-compression: idle/cold pages sit in the memory > and we may reduce zsmalloc memory usage if we recompress those > idle pages. > > User-space has a number of ways to control the behavior > and impact of zram recompression: what type of pages should be > recompressed, size watermarks, etc. Please refer to documentation > patch. Hi Sergey, First of all, I am really sorry to attend the party too late. I absolutely agree the feature is really useful and even I am thinking to support multiple comression trials on the fly for future. So I'd like to introduce the feature more general shape to be extended later so review will go. Thanks!