Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3380261pxb; Wed, 13 Oct 2021 04:59:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhURbS76RhHCDApQ8veCT81myG+PASKhSkvF0OEpf0yp3ELdIobyKfoKmu5VN+WjcliBdi X-Received: by 2002:a05:6a00:138a:b0:44c:b200:38d7 with SMTP id t10-20020a056a00138a00b0044cb20038d7mr37600119pfg.5.1634126397120; Wed, 13 Oct 2021 04:59:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634126397; cv=none; d=google.com; s=arc-20160816; b=vI5x1/cqbBNAY3BrSUX4SwWcD4C9Xrb/I2aRnFfNAnffFIkr0//9dtbc9pSwBi+Jky l4HfzjeK6Ct8IwsACOvLKErgENrnJLd89UA+UIvSqNg7CE+AcPT/ZYY0eNn6D2VoVROw SQpZMpJLvPuyS/B+Qr7sz8c1/WypVkVEOv71wkoq9NwfjoUOPvJKCohvALGUKKjOe4Lp ps8YX2tRAGYg1AT/3vFUNEg91fLM5Q5BuKpeksc9wDk07uZHWTC5jLt5KDakeUiOW4Cp MBfeDSOIhJtJsdvCqGoyT1YOcLAXktaMUWwHOwMZcKUvvrHUGwZDbbLaLaVj8EXl1Vdx ROsg== 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; bh=dzISgqLA56eLtv548on8HhkZ+K+tfgrUCGLxx6/lGgA=; b=nLexInBHoSjdhIxVbVHpSYNsq6dfolXhmPc3GGvJ9b2U/r9xqk/aYNyNZCtFWuJmb1 D6J3BBtqiSMgIUfZ6tTHXG1Jkt97fS3cA4uTibTSjNgmvPS6mAgzDMXnngqlYdJnsWYV 0i3mIiqQaifIhtPDOxR4nzadoPhaZNVqXKoZ6vlPu8WldEkFU8YD18IKiKKyR+K1NQxq 48yP8CbejMAPWJ2F+ePbVvSIP6mzZzyrhpoobkJdSIjJbMntWqcB/M+Q1YN5YW/5Cwfl AlWJBfdEXkKkPSAytrQja6AwpCXagLsJiW54oC1FedoXyZPSFnu3LyAP0dL2eCX/k27X y89Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b22si7732621pjz.98.2021.10.13.04.59.35; Wed, 13 Oct 2021 04:59:57 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229715AbhJMMAe (ORCPT + 99 others); Wed, 13 Oct 2021 08:00:34 -0400 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:56358 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbhJMMAe (ORCPT ); Wed, 13 Oct 2021 08:00:34 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0UrhChj4_1634126307; Received: from B-P7TQMD6M-0146.local(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0UrhChj4_1634126307) by smtp.aliyun-inc.com(127.0.0.1); Wed, 13 Oct 2021 19:58:28 +0800 Date: Wed, 13 Oct 2021 19:58:26 +0800 From: Gao Xiang To: Yue Hu Cc: xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org, huyue2@yulong.com, zhangwen@yulong.com, zbestahu@163.com Subject: Re: [PATCH] erofs: fix the per-CPU buffer decompression for small output size Message-ID: References: <20211013092906.1434-1-zbestahu@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 13, 2021 at 07:51:55PM +0800, Gao Xiang wrote: > Hi Yue, > > On Wed, Oct 13, 2021 at 05:29:05PM +0800, Yue Hu wrote: > > From: Yue Hu > > > > Note that z_erofs_lz4_decompress() will return a positive value if > > decompression succeeds. However, we do not copy_from_pcpubuf() due > > to !ret. Let's fix it. > > > > Signed-off-by: Yue Hu > > Thanks for catching this. This is a valid issue, but it has no real > impact to the current kernels since such pcluster in practice will be > !inplace_io and trigger "if (nrpages_out == 1 && !rq->inplace_io) {" > above for upstream strategies. > > Our customized lz4 implementation will return 0 if success instead, so > it has no issue to our previous products as well. > > For such cases, how about updating z_erofs_lz4_decompress() to return > 0 if success instead rather than outputsize. Since I'll return 0 if > success for LZMA as well. In addition, I'm fine to getting rid of such path as well, since it has no real impact to our current upstream decompression strategy. If it has some use cases due to decompression strategy change, we could re-add it with some evaluation (some real numbers) later. Thanks, Gao Xiang > > Thanks, > Gao Xiang