Re: [PATCH] x86: branchless clear_page()

From: Alexey Dobriyan
Date: Tue Aug 23 2016 - 08:02:07 EST


On Tue, Aug 23, 2016 at 12:06 AM, Borislav Petkov <bp@xxxxxxxxx> wrote:
> On Mon, Aug 22, 2016 at 11:52:29PM +0300, Alexey Dobriyan wrote:
>> Apply alternatives at the call site instead of function body.
>> Save branch per clean page.
>
> Any size increase to an allyesconfig vmlinux and increase to
> alternatives application time?
>
> Booting with "debug-alternative" should help.

x86_64 allyesconfig kernel lists whole 56 calls to clear_page().
My usual kernel lists 8.

There are tons copy_from_user/copy_to_user entries and POPCNT
and CLAC/STAC, so I think those several dozens clear pages don't matter.