[PATCH v2] erofs-utils: lib: converted division to shift in z_erofs_load_compact_lcluster

Ashley Lee yester1324 at gmail.com
Fri Feb 27 10:37:05 AEDT 2026


On Wed, 25 Feb 2026 at 18:40, Gao Xiang <hsiangkao at linux.alibaba.com> wrote:
>
>
>
> On 2026/2/26 10:32, Yifan Zhao wrote:
> >
> > A quick search shows that x86 kernel implementation also use `div` instruction
> >
> > under Linux v6.19 and GCC 15.2.1, add GCC correctly generate shift instruction
>
> Could we try more GCC versions and find the impacts?
>
> Does it a recent GCC regression?
>
>
> >
> > in my arm64 machine with GCC 14.2.0.
> >
> > Could you also consider evaluate this optimization in kernel?
>
> Yes, but I wonder if `div` is already used for these years on x86,
> could you check this?

Hello all,

I'll attempt to perform benchmarks on as many architectures and
compiler variants as I can. I was looking into lkp-tests to perform
this however I was facing trouble running on my OS. Is there a
simple way to do this?

Thank you,

Ashley


More information about the Linux-erofs mailing list