Re: 2.6.12-rc5-mm1

From: Andrea Arcangeli
Date: Thu May 26 2005 - 17:28:15 EST


On Thu, May 26, 2005 at 09:15:26PM +0200, Mikael Pettersson wrote:
> (But please make it conditional on CONFIG_SECCOMP.)

Why should it be conditional? Isn't it faster to read it from the cpu
itself instead of reading it from slow ram? That info is cold in the
cache when the global tlb flush is invoked, while it's always in hot in
the cpu. Perhaps the cpu is dogslow at reading cr4 or what?

Note that the whole mmu_cr4 thing seems pretty flawed if used at
runtime, that's only necessary to initialize new cpus (head.S). So
basically at runtime nobody should read or write to mmu_cr4_features
global variable.

> The code called from __switch_to() would have to set or clear cr4
> locally only. That's easy using write_cr4() and read_cr4().

Agreed.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/