Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2237421rwd; Fri, 2 Jun 2023 06:53:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5vw6jDlCMx88a4/+RYwFtG6FjgT2OdkdyGwriXyYOiNcLU45+TyAfNuqPWi+fjKrP+qYVz X-Received: by 2002:a17:903:32c9:b0:1ab:1a73:7c7f with SMTP id i9-20020a17090332c900b001ab1a737c7fmr1463005plr.63.1685713979992; Fri, 02 Jun 2023 06:52:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685713979; cv=none; d=google.com; s=arc-20160816; b=l+5tqToYJ3dF30lzr3kSmI23lFrL1WfEL/rDy3uCuJ8BOj9La4yNK8jgPbdm1elk8t XeKG8gHTBXfVtVGA0mCkNWjNvK/AzU5TLxB58yM6WcMaUEjO6Vher2NSj8HoL4KtC4Iy gfngoxAgOoiMHIaHumhbVJq+UUqQ8CyE/QaoqE36NcVZaynE6RfhJmJ/Y85JegIplSeM qm3YP6BauHpPQNoD5ugzbvV4aSrYy9PXftGnzxERABh5gwm+pgasdR5LFc6Oiq/0Tghb 4Fst1GuAlFeNBlhrIU8e+S17vg+Oann+AykwwSH04ETlh4q7EcDPoEkGHLpvvd4bPd7h 5Nnw== 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:reply-to:user-agent :mime-version:date:message-id; bh=R+v+Henzz7X2Pa+VJD/VJYSWSZOfoIlb3EvE/tBEhcM=; b=Dwew+Lbrs/+ng+5osLGu1q+ZA+quk3Y/1sToW4at7bSm0tNHbK6zQg/0DZHi4+Mwxj bZu+UH457gdPLUkD1ol/gAUC8aOQHuOrQqsQdXgylrw6Lo7la136RLdXN6NrDmuUZFJa WnXFNxidE5JLVCm4b1BKUxa7ZRjVOiwIUWeErj5m2Lf7xgElcA60y5ZV8YJYopY/AtmQ 1fMZftmvqkiDmVvwlTuaeKdeRu4hcpJn+JbcNtwOXmBlTKcF4skabyyo8qwTiBy0/58n eyUX5R01jmqokWpvmGdTy7fekvTvGY5qQt7ccEzcRebHlm8OcnFaYoVF2vc/3kzEM+r1 fkRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y15-20020a17090322cf00b001b074688572si895895plg.650.2023.06.02.06.52.40; Fri, 02 Jun 2023 06:52:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235858AbjFBNlZ (ORCPT + 99 others); Fri, 2 Jun 2023 09:41:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234946AbjFBNlU (ORCPT ); Fri, 2 Jun 2023 09:41:20 -0400 Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [80.237.130.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 047BF137; Fri, 2 Jun 2023 06:41:19 -0700 (PDT) Received: from [2a02:8108:8980:2478:8cde:aa2c:f324:937e]; authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1q551o-0006Ct-LG; Fri, 02 Jun 2023 15:41:16 +0200 Message-ID: <0625e839-65a5-2c79-681a-c43b502cb89f@leemhuis.info> Date: Fri, 2 Jun 2023 15:41:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Reply-To: Linux regressions mailing list Subject: Re: [PATCH 01/13] Revert "ext4: remove ac->ac_found > sbi->s_mb_min_to_scan dead check in ext4_mb_check_limits" Content-Language: en-US, de-DE To: Ojaswin Mujoo , linux-ext4@vger.kernel.org, Theodore Ts'o Cc: Ritesh Harjani , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kara , Kemeng Shi , Ritesh Harjani , Linux kernel regressions list References: From: "Linux regression tracking #adding (Thorsten Leemhuis)" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;regressions@leemhuis.info;1685713279;ef956bba; X-HE-SMSGID: 1q551o-0006Ct-LG X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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-ext4@vger.kernel.org [CCing the regression list, as it should be in the loop for regressions: https://docs.kernel.org/admin-guide/reporting-regressions.html] [TLDR: I'm adding this report to the list of tracked Linux kernel regressions; the text you find below is based on a few templates paragraphs you might have encountered already in similar form. See link in footer if these mails annoy you.] On 25.05.23 13:32, Ojaswin Mujoo wrote: > This reverts commit 32c0869370194ae5ac9f9f501953ef693040f6a1. > > The reverted commit was intended to remove a dead check however it was observed > that this check was actually being used to exit early instead of looping > sbi->s_mb_max_to_scan times when we are able to find a free extent bigger than > the goal extent. Due to this, a my performance tests (fsmark, parallel file > writes in a highly fragmented FS) were seeing a 2x-3x regression. > > Example, the default value of the following variables is: > > sbi->s_mb_max_to_scan = 200 > sbi->s_mb_min_to_scan = 10 > > In ext4_mb_check_limits() if we find an extent smaller than goal, then we return > early and try again. This loop will go on until we have processed > sbi->s_mb_max_to_scan(=200) number of free extents at which point we exit and > just use whatever we have even if it is smaller than goal extent. > > Now, the regression comes when we find an extent bigger than goal. Earlier, in > this case we would loop only sbi->s_mb_min_to_scan(=10) times and then just use > the bigger extent. However with commit 32c08693 that check was removed and hence > we would loop sbi->s_mb_max_to_scan(=200) times even though we have a big enough > free extent to satisfy the request. The only time we would exit early would be > when the free extent is *exactly* the size of our goal, which is pretty uncommon > occurrence and so we would almost always end up looping 200 times. > > Hence, revert the commit by adding the check back to fix the regression. Also > add a comment to outline this policy. > > Signed-off-by: Ojaswin Mujoo > Reviewed-by: Ritesh Harjani (IBM) > [...] Thanks for the report. To be sure the issue doesn't fall through the cracks unnoticed, I'm adding it to regzbot, the Linux kernel regression tracking bot: #regzbot ^introduced 32c0869370194ae5ac #regzbot title ext4: 2x-3x regression in performance tests #regzbot monitor: https://lore.kernel.org/all/ddcae9658e46880dfec2fb0aa61d01fb3353d202.1685449706.git.ojaswin@linux.ibm.com/ #regzbot fix: Revert "ext4: remove ac->ac_found > sbi->s_mb_min_to_scan dead check in ext4_mb_check_limits" #regzbot ignore-activity This isn't a regression? This issue or a fix for it are already discussed somewhere else? It was fixed already? You want to clarify when the regression started to happen? Or point out I got the title or something else totally wrong? Then just reply and tell me -- ideally while also telling regzbot about it, as explained by the page listed in the footer of this mail. Developers: When fixing the issue, remember to add 'Link:' tags pointing to the report (the parent of this mail). See page linked in footer for details. Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) -- Everything you wanna know about Linux kernel regression tracking: https://linux-regtracking.leemhuis.info/about/#tldr That page also explains what to do if mails like this annoy you.