Hi > On 29 May 2020, at 19:19, Благодаренко Артём <artem.blagodarenko@xxxxxxxxx> wrote: > > Also, we have encountered directory creating rate drop with this (not exact this, but Lustre FS version) patch. From 70-80K to 30-40K. > Excluding this patch restore rates to the original values. > I am investigating it now. Alex, do you expect this optimisation has impact to names creation? > Is plenty of files and directories creation corner case for this optimisation? Noticed as well, the last version posted to the list should have this problem fixed. > > Can be useful giving an ability to disable this optimisation? As option, by setting s_mb_prefetch to zero. > Now 0 at s_mb_prefetch allows to skip the optimisation for cr=0 and cr=1. s_mb_prefetch_limit=0 can be used to disable prefetching? >> + /* limit prefetching at cr=0, otherwise mballoc can >> + * spend a lot of time loading imperfect groups */ >> + if (ac->ac_criteria < 2 && ac->ac_prefetch_ios >= sbi->s_mb_prefetch_limit) >> + return; > > A comment above says prefetching is limited for cr=0 but code limit it for cr=0 and cr=1. > Do you need change the comment or code? OK >> + if (sbi->s_mb_prefetch > ext4_get_groups_count(sb)) >> + sbi->s_mb_prefetch = ext4_get_groups_count(sb); >> + /* now many real IOs to prefetch within a single allocation at cr=0 > > Do you mean “how many” here? At cr=0 and cr=1? Yes, of course Thanks, Alex