Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2622033pxb; Sun, 17 Oct 2021 20:46:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJhZRJUCwDyFYKezmSXe3Zvyl6HoO+Wbz3tRXVpKDkgoDiR0vE2D+VbxtsCss++Eg6taWZ X-Received: by 2002:a17:902:bd98:b0:13f:9ae7:54d1 with SMTP id q24-20020a170902bd9800b0013f9ae754d1mr13821324pls.15.1634528790474; Sun, 17 Oct 2021 20:46:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634528790; cv=none; d=google.com; s=arc-20160816; b=oegBs/Ha3BJduxn83C/uY1cUMlWVRh0JEAwj/CnMR/PhbOnuARkD5k9r01QLxIgc29 6im+TyobtoE/dt+lOKvJkq6yBUmpRgH26TETungPJjnZ1SdoNCkAeo8viogL19Ar6Kg+ eAJkc3da2V5oJwkEIOy0f2g5ZlaCsWQ5LUfYUnYkuzur91lZtuURmOGL31k2qvD/50i7 xolVvnIkBCKYnUM/DiYAup0IyQShQizEnH0Vj1zxGqy7t9lDWEvb3DkRVpIWONNRw49k 7muxuiDTqtI1c3JZd0I4sRdv9AYfFzm3OexAx4/tC4+YMivYrE1l2s3nPNjTIUReMsV5 Gntg== 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=QfihB6fjdcXaeLc64zPTu7TX6Wye5KXkYjFFEKlQurY=; b=Yydh6Cat0p9hGTXNT7uTSa8vUEg8AV3SrKqaIfSzae1S1I7XxhLEsCKGhj8g1L2FVC EICteKZeqkVNveolTbRTmSf/M5ERsdLQao4+C/nPUH3k547KODCYF0t41MqSoyjYFac9 TZuRm4N1JV28F6S7Fb+O9h6ev+pQGAbJgta6mZMSFoo6btNy26aiOPcKZdAJwwIMFoHS MUqUtint0CBe5isKLnS0Cy7vxXzxb0gR+8A0uEUy7AwQcMHSqawEAb2kkq77EY18x3SX C27qJHrKVRM3pld2+lSYpKBNFwcuHbb63mkHzNqd9wqq/rWpo4eSlOUV0iaaZrRQ9mHB Tq4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QsjUkaYN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z8si23354763pgi.213.2021.10.17.20.46.18; Sun, 17 Oct 2021 20:46:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QsjUkaYN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S237285AbhJQP2E (ORCPT + 98 others); Sun, 17 Oct 2021 11:28:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:51548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237062AbhJQP2D (ORCPT ); Sun, 17 Oct 2021 11:28:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A552560FE3; Sun, 17 Oct 2021 15:25:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634484353; bh=TOvsoeiySltB72C7sSNt1d8uqiFoxmRPAjkjMfeeol0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=QsjUkaYNRsVESwdCPwmI1F+YLL7snIqEvi7bzc+tO2kgP+trWZ4t8rJxsNZEk64QS 9qfIgn6dNRfNfIQXiZ4rxOqC1+/dM0Z7haP8yh7OH5B0C3iTyYbE6BfX96POKxc+qu qXOFmOhts8SZ7Ix6tCqkSVYC8hDR6XYYCnpXZI8KD/IL9CvY+p+S1mk+poDMCkMvD2 wTWoZAh5CZ2x5uMmM9GEpOm5UEjsXtFdHpZ12FGQXy6/RRMv1jR5HdePed3MJvy3wk Bw7bwBTtpnesCu7KzAOfskQbRfOxGtPqUa2y+PiBV41nbtEh0bwXfymxjrTDvT3/Y8 hia8GHlE+ASyg== Message-ID: Date: Sun, 17 Oct 2021 23:25:49 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v2 1/3] erofs: get compression algorithms directly on mapping Content-Language: en-US To: Gao Xiang , linux-erofs@lists.ozlabs.org Cc: LKML , Yue Hu , Gao Xiang References: <20211008200839.24541-1-xiang@kernel.org> <20211008200839.24541-2-xiang@kernel.org> From: Chao Yu In-Reply-To: <20211008200839.24541-2-xiang@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/10/9 4:08, Gao Xiang wrote: > From: Gao Xiang > > Currently, z_erofs_map_blocks_iter() returns whether extents are > compressed or not, and the decompression frontend gets the specific > algorithms then. > > It works but not quite well in many aspests, for example: > - The decompression frontend has to deal with whether extents are > compressed or not again and lookup the algorithms if compressed. > It's duplicated and too detailed about the on-disk mapping. > > - A new secondary compression head will be introduced later so that > each file can have 2 compression algorithms at most for different > type of data. It could increase the complexity of the decompression > frontend if still handled in this way; > > - A new readmore decompression strategy will be introduced to get > better performance for much bigger pcluster and lzma, which needs > the specific algorithm in advance as well. > > Let's look up compression algorithms in z_erofs_map_blocks_iter() > directly instead. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,