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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 10 Oct 2022 20:19:43 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Yury Norov <yury.norov@...il.com>
Cc:     linux-kernel@...r.kernel.org,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>
Subject: Re: [GIT PULL] bitmap changes for v6.0-rc1

On Mon, Oct 10, 2022 at 8:09 PM Yury Norov <yury.norov@...il.com> wrote:
>
> > So I _think_ all the nr_cpu_id's games are mainly because we don't
> > want to allocate huge arrays when  you can't actually have that many
> > CPU's - but for a small NR_CPUS situation that just isn't an issue
> > anyway.
> >
> > Yes? No?
>
> You're talking about .data section. FORCE_NR_CPUS is about .text and
> code generation.

No, it's more than just code size that you compare.

It's also the "walk over big arrays".

It doesn't matter if the *code* is simpler, if it's a fixed walk over
64 long-words because the code uses a fixed 4096-bit bitmap.

Yes, that constant 64 is simpler than loading a variable, but it's not
*better*. It's worse. It has allocated more memory, and then it wastes
time walking over it.

So just looking at code size and "simplicity" is bogus.

Yes, a constant loop is smaller and simpler, but unless the constant
is also *small*, it sure isn't better.

              Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ