From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12E80EB64DD for ; Tue, 11 Jul 2023 13:56:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233130AbjGKN4h (ORCPT ); Tue, 11 Jul 2023 09:56:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233116AbjGKN4d (ORCPT ); Tue, 11 Jul 2023 09:56:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2E5B10C7 for ; Tue, 11 Jul 2023 06:56:30 -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 6CA7B61509 for ; Tue, 11 Jul 2023 13:56:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58008C433C8; Tue, 11 Jul 2023 13:56:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689083789; bh=qXZaYifrGUQeoLHM3DrN40jfqkcENYlJOULXTr7bL58=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=cvytjGdvzrWapWKJcPPm6KysqJl/k0pfkT+QBiYVsuAFaYSx/WXQVyHNHwa1Yn8K9 3Fje5S9+D9qILv/6gqEu8AcOxZArpJXIsdYUIuPBIVGhJj/DMQyYR1XKzUjQU88zyb vDUK2iskiVWVVEPohO5VR0Fzo0LrcSlquH5mjTu0GJOqaMfPkbk0YbJmp2b2qcp2Ac VnkEdLXDlV4JCrFuRa7xEHV26JDvy30mlCFCR1YvgvFoKk9gRwvAzAs/g5b4USTfay fY2YxsixmG1n7DvDJOp9zHGzyv+BEnhSfeFpRLWaebPX9qE5TZSfCqYZA92V/LE1lq PEsbHOaDjsasQ== Message-ID: <56c3e00b-d383-105d-29a3-570d94df4801@kernel.org> Date: Tue, 11 Jul 2023 21:56:25 +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] erofs: avoid unnecessary loops in z_erofs_pcluster_readmore() when read page beyond EOF To: Chunhai Guo , xiang@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> Content-Language: en-US From: Chao Yu In-Reply-To: <20230710042531.28761-1-guochunhai@vivo.com> 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 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 Reviewed-by: Chao Yu Thanks,