From: Kemeng Shi <shikemeng@huaweicloud.com>
To: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Cc: tytso@mit.edu, adilger.kernel@dilger.ca, ritesh.list@gmail.com,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 10/10] ext4: correct some stale comment of criteria
Date: Thu, 27 Jul 2023 09:29:11 +0800 [thread overview]
Message-ID: <5db4b292-fee8-9581-841c-206ba10d4b80@huaweicloud.com> (raw)
In-Reply-To: <ZMEyxLauFkXBwgUZ@li-bb2b2a4c-3307-11b2-a85c-8fa5c3a69313.ibm.com>
on 7/26/2023 10:50 PM, Ojaswin Mujoo wrote:
> On Wed, Jul 26, 2023 at 02:51:06AM +0800, Kemeng Shi wrote:
>> We named criteria with CR_XXX, correct stale comment to criteria with
>> raw number.
>
> Hi Kemeng,
>
> Thanks for the cleanups.
>
>>
>> Fixes: f52f3d2b9fba ("ext4: Give symbolic names to mballoc criterias")
>> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
>> Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
>> ---
>> fs/ext4/mballoc.c | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
>> index 36eea63eaace..de5da76e6748 100644
>> --- a/fs/ext4/mballoc.c
>> +++ b/fs/ext4/mballoc.c
>> @@ -2777,8 +2777,8 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac)
>>
>> /*
>> * ac->ac_2order is set only if the fe_len is a power of 2
>> - * if ac->ac_2order is set we also set criteria to 0 so that we
>> - * try exact allocation using buddy.
>> + * if ac->ac_2order is set we also set criteria to CR_POWER2_ALIGNED
>> + * so that we try exact allocation using buddy.
>> */
>> i = fls(ac->ac_g_ex.fe_len);
>> ac->ac_2order = 0;
>> @@ -2835,8 +2835,8 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac)
>> /*
>> * Batch reads of the block allocation bitmaps
>> * to get multiple READs in flight; limit
>> - * prefetching at cr=0/1, otherwise mballoc can
>> - * spend a lot of time loading imperfect groups
>> + * prefetching at cr below CR_FAST, otherwise mballoc
>
> One of my earlier patchset has replaced the CR_FAST macro with
> ext4_mb_cr_expensive() so maybe we can account for that here:
>
> https://lore.kernel.org/linux-ext4/20230630085927.140137-1-ojaswin@linux.ibm.com/
>
Hi Ojaswin, sorry for missing this. I still could not find the comment update
of stale comment "limit prefetching at cr=0/1" in that patch. Maybe we could
update comment to "prefetching at inexpensive CR, otherwise ...". What do
you think. Or did I miss anything.
--
Best wishes
Kemeng Shi
> Regards,
> ojaswin
>
>> + * can spend a lot of time loading imperfect groups
>
>> */
>> if ((prefetch_grp == group) &&
>> (cr >= CR_FAST ||
>> --
>> 2.30.0
>>
>
next prev parent reply other threads:[~2023-07-27 1:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-25 18:50 [PATCH v2 00/10] A few fixes and cleanups to mballoc Kemeng Shi
2023-07-25 18:50 ` [PATCH v2 01/10] ext4: correct grp validation in ext4_mb_good_group Kemeng Shi
2023-07-25 11:06 ` Ritesh Harjani
2023-07-25 18:50 ` [PATCH v2 02/10] ext4: avoid potential data overflow in next_linear_group Kemeng Shi
2023-07-25 18:50 ` [PATCH v2 03/10] ext4: return found group directly in ext4_mb_choose_next_group_p2_aligned Kemeng Shi
2023-07-25 18:51 ` [PATCH v2 04/10] ext4: use is_power_of_2 helper in ext4_mb_regular_allocator Kemeng Shi
2023-07-25 18:51 ` [PATCH v2 05/10] ext4: remove unnecessary return for void function Kemeng Shi
2023-07-25 18:51 ` [PATCH v2 06/10] ext4: replace the traditional ternary conditional operator with with max()/min() Kemeng Shi
2023-07-25 18:51 ` [PATCH v2 07/10] ext4: remove unused ext4_{set}/{clear}_bit_atomic Kemeng Shi
2023-07-25 18:51 ` [PATCH v2 08/10] ext4: return found group directly in ext4_mb_choose_next_group_goal_fast Kemeng Shi
2023-07-25 18:51 ` [PATCH v2 09/10] ext4: return found group directly in ext4_mb_choose_next_group_best_avail Kemeng Shi
2023-07-25 18:51 ` [PATCH v2 10/10] ext4: correct some stale comment of criteria Kemeng Shi
2023-07-26 14:50 ` Ojaswin Mujoo
2023-07-27 1:29 ` Kemeng Shi [this message]
2023-07-27 5:36 ` Ojaswin Mujoo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5db4b292-fee8-9581-841c-206ba10d4b80@huaweicloud.com \
--to=shikemeng@huaweicloud.com \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=ritesh.list@gmail.com \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).