Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp3521159rwb; Sun, 30 Jul 2023 09:19:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlFi2zsCqtpOmENffWnLF+SOwPdS0TujR86IntUbnAqGfD7Q25/zXMNKi5STW2Mb2rYAKUWd X-Received: by 2002:a17:903:120a:b0:1bb:9bc8:d230 with SMTP id l10-20020a170903120a00b001bb9bc8d230mr8632185plh.23.1690733992071; Sun, 30 Jul 2023 09:19:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690733992; cv=none; d=google.com; s=arc-20160816; b=w1fBDS1fnM7E9BdlazhJH6kl8iiQBUEgp7WyWGTYv5mMMwId1anCMYymvrbfdCv+Vt IP/DXqzsdsW6/NexZk5QGLV/5hU9xuvwwR/JiinWnidnmpjXwCSP/P3HKqyhmp//0g6a mdzRKrCIcXldNzNxOKqChnSRBdcFnR2zzkuYbhodepA60k0+C27OfSMIvDpHSW6BoKoW 2rWNDzB7d9QRRih3AnovCEq2PyPgrC1r8ocvxdPQkLrkAL1dXM5vJn9xirUCNCS6Ijok lFLT2Z2BawGa4JgdlKw0ESWu4b8xgEXCnrLnruUuYVREEHuOXryX4wlEnyvk8Mt4JNYn UO7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=fskAD8AJoz0fLh0ZiAvtMsPhp0cbG6BthrC8p9h9lXc=; fh=MUrXDV1Qh2vbRkt1UZ2m7wto3prWU9PrdnqcIPiZH/A=; b=WE7dPmf5Xf8qVMhixcWNmO4EWWcoGVVtO69jXZo+MA5aVcYcTaXBQBq/IbGMcYj1BU xylL1/hkIIwfzX7zwU+X+wVunkbPqxhuxtR+BLl76G5W98J2oXW55otg5hfQUXZIBBEm WNZtcQekKsGfSpRNVAtUNU9QiSIG77xkDgDUizOOjOSK3sFjIasE5g84ANNmUT/G7wkR HumsyjQRb18MXNWVzP4nGKbQMKvdUNF6x56XHVa+rTxZhmS009HufZn6C0Nh8vvUXMIR 20K1RUpIiFdgNi1y2Ki4dRAWoF5zT8453Rzke9IsvaXJv90wCXxiablfjNTXBCZmzypM mfjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Q+KeLsHO; 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 hg16-20020a17090b301000b0026404467b7dsi2671769pjb.110.2023.07.30.09.19.38; Sun, 30 Jul 2023 09:19:52 -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=@kernel.org header.s=k20201202 header.b=Q+KeLsHO; 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 S229625AbjG3ORV (ORCPT + 99 others); Sun, 30 Jul 2023 10:17:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbjG3ORT (ORCPT ); Sun, 30 Jul 2023 10:17:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79A11D3 for ; Sun, 30 Jul 2023 07:17:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1661660C85 for ; Sun, 30 Jul 2023 14:17:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3813C433C8; Sun, 30 Jul 2023 14:17:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690726637; bh=/SgtMSC4gFWZmhxWNtgshquG2Pqs3414Skm+heLmjis=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Q+KeLsHOXV4yh/Gebrk5sQoIu4B3MB+9eRfzf7/9Cuvk8b4e23bi0eeT+9caELcfx 4Nz81yP9OMGyU0P8w4LvKZx6s6ZNfKrR/CaItNQ7n+HGIeWmP3otxeLJFuJHVxZuFj h5UtRmXz/Co1bmvj1IO1CDSbNP7h757xKBWwJvYUArpbJSPuoQ87CdaEp/5aAZld+5 C520t9rNHJWmaAUBgrpsRpXTXX6XDFROCiffBGDk3qJx2cUV/juVSk6SytscekXOEq /XoRzuzX7nM/5LqaoE65l8bdjTOHUzbwLATxS8NctwhPctQ0jJulYVDcmjO49xtes2 uHRbd2ALXJxKA== Message-ID: <9735ac90-d5bd-2cfa-2ac2-d381faa18747@kernel.org> Date: Sun, 30 Jul 2023 22:17:15 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v5] erofs: DEFLATE compression support Content-Language: en-US To: Gao Xiang , linux-erofs@lists.ozlabs.org Cc: LKML References: <20230730141245.6691-1-hsiangkao@linux.alibaba.com> From: Chao Yu In-Reply-To: <20230730141245.6691-1-hsiangkao@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 2023/7/30 22:12, Gao Xiang wrote: > Add DEFLATE compression as the 3rd supported algorithm. > > DEFLATE is a popular generic-purpose compression algorithm for quite > long time (many advanced formats like gzip, zlib, zip, png are all > based on that) as Apple documentation written "If you require > interoperability with non-Apple devices, use COMPRESSION_ZLIB. [1]". > > Due to its popularity, there are several hardware on-market DEFLATE > accelerators, such as (s390) DFLTCC, (Intel) IAA/QAT, (HiSilicon) ZIP > accelerator, etc. In addition, there are also several high-performence > IP cores and even open-source FPGA approches available for DEFLATE. > Therefore, it's useful to support DEFLATE compression in order to find > a way to utilize these accelerators for asynchronous I/Os and get > benefits from these later. > > Besides, it's a good choice to trade off between compression ratios > and performance compared to LZ4 and LZMA. The DEFLATE core format is > simple as well as easy to understand, therefore the code size of its > decompressor is small even for the bootloader use cases. The runtime > memory consumption is quite limited too (e.g. 32K + ~7K for each zlib > stream). As usual, EROFS ourperforms similar approaches too. > > Alternatively, DEFLATE could still be used for some specific files > since EROFS supports multiple compression algorithms in one image. > > [1] https://developer.apple.com/documentation/compression/compression_algorithm > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,