On Wed, Nov 1, 2017 at 3:14 PM, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> wrote: > > I ran some quick tests. When CONFIG_KAISER=y, but "echo 0 > > kaiser-enabled", the tests that I ran were within the noise vs. a > vanilla kernel, and that's with *zero* optimization. I guess the optimal version just ends up switching between two different entrypoints for the on/off case. And the not-quite-as-aggressive, but almost-optimal version would just be a two-byte asm alternative with an unconditional branch to the movcr3 code and back, and is turned into a noop when it's off. But since 99%+ of the cost is going to be that cr3 write, even the stupid "just load value and branch over the cr3 conditionally" is going to make things hard to measure. Linus -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>