lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFnufp0b=SirPypm9VidxXz1+C1YU33Y860JXkqnYLZFNLF=BA@mail.gmail.com>
Date: Fri, 30 Jan 2026 01:07:46 +0100
From: Matteo Croce <technoboy85@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KUnit: memcpy: add benchmark

Il giorno ven 30 gen 2026 alle ore 01:04 Matteo Croce
<technoboy85@...il.com> ha scritto:
>
> Il giorno ven 30 gen 2026 alle ore 00:53 Andrew Morton
> <akpm@...ux-foundation.org> ha scritto:
> >
> > On Fri, 30 Jan 2026 00:36:30 +0100 Matteo Croce <technoboy85@...il.com> wrote:
> >
> > > > Is cond_resched() inside preempt_disable() actually legal?
> > > >
> > > > Might be, but it doesn't make a lot of sense, does it?
> > > >
> > > > > +     }
> > > > > +     preempt_enable();
> > > > > +
> > > >
> > >
> > > Right. In a previous version I was doing
> > > preempt_disable()/preempt_enable() around the two ktime_get_ns(), but
> > > then I thought that enabling and disabling preemption 100 time was too
> > > much.
> > > I'll restore the preempt macros around the actual copy and remove
> > > cond_resched().
> >
> > OK.
> >
> > local_irq_save() would be more accurate.
> >
>
> Right, even more strict.
>
> > Does it really need to copy 4MB?  Smaller would make
> > local_irq_disable() more viable.
> >
> > kmalloc(4MB) does seem to be pushing our luck.  I'm spotting
> >
> >         ./arch/arm/configs/pxa_defconfig:CONFIG_ARCH_FORCE_MAX_ORDER=8
> >
> > which is 1MB?
>
> I wanted to stay outside of the caches as much as possible.
> What about using "PAGE_SIZE * (1 << CONFIG_ARCH_FORCE_MAX_ORDER)" so
> it adjusts itself?
>

Or "PAGE_SIZE << MAX_PAGE_ORDER", if I grep it I see it's already used
here and there.

-- 
Matteo Croce

perl -e 'for($t=0;;$t++){print chr($t*($t>>8|$t>>13)&255)}' |aplay

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ