Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp34867114rwd; Sun, 9 Jul 2023 22:20:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlGqzTpHsKz+meeezdMugz4/va5cSj0rto5ypmZOTU+YPpc+F0sjiD6Agf/3Vj/j0qqwfX56 X-Received: by 2002:a54:4104:0:b0:3a1:c6ed:b902 with SMTP id l4-20020a544104000000b003a1c6edb902mr10652254oic.37.1688966416539; Sun, 09 Jul 2023 22:20:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688966416; cv=none; d=google.com; s=arc-20160816; b=jz7USSGbeRnHaGfpNrbNYltupCLB+6ANPKCtmO/7X9Qph6mX+k12XHFJBWruN0XC47 q8PPohC4o/RMrZkbrUjJqdV0qpQ9l77yI8m/GLT9to7YH/gbzo+B3rtnJ0wtUbZZNWFs wCHhRm+ac4rlq8o0Y/lsbLykTqcQ8gq4PCQoaHNS8GeSTKNzJRweSWlg9VOfbgTwjb5s LkRt6pGnJQiY5HAg8ve0Z6HQtkc57xxm8BMjMqhZFG+dxgjhczR78vo8DzjuRumFIZtG Vs6SEYqnBlhttxff8o+PRFGeOos9Z4/m8zkH9GCnwKAaf0M4chhNNnzc12CirwjOfCkz KZNQ== 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:subject:user-agent:mime-version:date:message-id; bh=2YV7AoB3jYm4xuSKbxIlopp5VMocYvu5QFu3qnBErVc=; fh=oX2SwJyHdU1i0uIJdHxYf8a4O6/4qGRRcAhuK+4/U6A=; b=OQY/G90zvI39r/eEOpWX75N8V/N84WttDTLUdr66HEA2RbZ1yZy9ygvRdhsfs6GhuQ 68GTWP8hg7Ruqn0JDTB2frZZX9RnghDaxHE406u/cweUm5O9kHfbRIH1zG3FI4RKD3lp OHdRWVmnlaMjdjBdUwdOpLpbvnjKgs6o3urFX5NdB9x9QWIuDbmGYwY/yerF3SMg6877 IU3BiAub+QMAEF/duLE+Eg2OuuhJF8sG3x+PV+YE9u9izqOu/KbALa/fi9502EEbbfl4 10xSeQDsgHrcSNWuWa5r3HBt3n4sJkgGKmIqYJB0q1m9XxWCb74z/LNALb1CVAUw7U6C C0vQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n13-20020a63590d000000b00542897dcc22si7962723pgb.516.2023.07.09.22.20.01; Sun, 09 Jul 2023 22:20:16 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229831AbjGJEkT (ORCPT + 99 others); Mon, 10 Jul 2023 00:40:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbjGJEkS (ORCPT ); Mon, 10 Jul 2023 00:40:18 -0400 Received: from out30-99.freemail.mail.aliyun.com (out30-99.freemail.mail.aliyun.com [115.124.30.99]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BCE9107 for ; Sun, 9 Jul 2023 21:40:16 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0Vmxcfaa_1688964012; Received: from 30.97.48.247(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0Vmxcfaa_1688964012) by smtp.aliyun-inc.com; Mon, 10 Jul 2023 12:40:13 +0800 Message-ID: <555b749b-5102-7bc1-109f-15b16be406a2@linux.alibaba.com> Date: Mon, 10 Jul 2023 12:40:11 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] erofs: avoid unnecessary loops in z_erofs_pcluster_readmore() when read page beyond EOF To: Chunhai Guo , xiang@kernel.org, chao@kernel.org Cc: huyue2@coolpad.com, jefflexu@linux.alibaba.com, linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20230710042531.28761-1-guochunhai@vivo.com> From: Gao Xiang In-Reply-To: <20230710042531.28761-1-guochunhai@vivo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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/10 12:25, Chunhai Guo wrote: > z_erofs_pcluster_readmore() may take a long time to loop when the page > offset is large enough, which is unnecessary should be prevented. > For example, when the following case is encountered, it will loop 4691368 > times, taking about 27 seconds. > - offset = 19217289215 > - inode_size = 1442672 > > Signed-off-by: Chunhai Guo It looks good to me, Fixes: 386292919c25 ("erofs: introduce readmore decompression strategy") Reviewed-by: Gao Xiang Thanks, Gao Xiang