Re: [PATCH v10 7/7] x86/tsc: use tsc early

From: Pavel Tatashin
Date: Wed Jun 20 2018 - 17:31:00 EST


Hi Peter,

> That said; flipping static keys early isn't hard. We should call
> jump_label_init() early, because we want the entries sorted and the
> key->entries link set. It will also replace the GENERIC_NOP5_ATOMIC
> thing, which means we need to also do arch_init_ideal_nop() early, but
> since that is pure CPUID based that should be doable.
>
> And then something like the below could be used.

I like the idea of making static branches available early, as it can
be used in more places
during boot.

However, that should be part of a separate project, and a follow up
cleanup can be done
to places that benefit from it. Such as tsc.c and perhaps sched.c
might benefit as well.

Thank you,
Pavel