Re: [PATCH v3 06/10] fs/namei.c: Improve dcache hash function

From: Linus Torvalds
Date: Thu Jun 02 2016 - 12:35:42 EST


On Wed, Jun 1, 2016 at 7:31 PM, George Spelvin
<linux@xxxxxxxxxxxxxxxxxxx> wrote:
>
> I could use two more iterations of HASH_MIX() or something similar,
> then just take the x value, but that's 6 cycles. If a multiply is
> 4 or 5 cycles, that's a net loss.

Yes. Especially since the multiply will often end up more able to be
run in parallel with other things.

> But worrying about that is the reason I left provision for arch-specific
> hooks, and I'm already working on the first: the PA-RISC doesn't have
> an integer multiplier at all, although the FPU can do 32-bit integer
> multiplies.

Don't worry about pa-risc. There may be a handful of users, where even
"users" is more of a "boot up occasionally just for perverse fun"
rather than anything else.

That's true of at least half the architectures we support - the only
ones that really matter and where performance is a real isseu are
currently x86, arm and powerpc.

Linus