From: Thomas Gleixner <tglx@linutronix.de>
To: Mihai Carabas <mihai.carabas@oracle.com>, linux-kernel@vger.kernel.org
Cc: mingo@redhat.com, bp@alien8.de, x86@kernel.org,
boris.ostrovsky@oracle.com, konrad.wilk@oracle.com,
Mihai Carabas <mihai.carabas@oracle.com>
Subject: Re: [PATCH RFC 3/7] x86: kernel: cpu: bugs.c: modify static_cpu_has to boot_cpu_has
Date: Mon, 06 Jul 2020 16:46:33 +0200 [thread overview]
Message-ID: <87tuykr99y.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <1593703107-8852-4-git-send-email-mihai.carabas@oracle.com>
Mihai Carabas <mihai.carabas@oracle.com> writes:
> The usage of static_cpu_has in bugs.c file is counter-productive
> since the code is executed once but there is extra effort to patch
> it and keep alternatives in a special section --- so there is both
> space and time cost.
>
> Quote from _static_cpu_has definition:
> /*
> * Static testing of CPU features. Used the same as boot_cpu_has(). It
> * statically patches the target code for additional performance. Use
> * static_cpu_has() only in fast paths, where every cycle counts. Which
> * means that the boot_cpu_has() variant is already fast enough for the
> * majority of cases and you should stick to using it as it is generally
> * only two instructions: a RIP-relative MOV and a TEST.
> */
>
> There are two other places where static_cpu_has is used and might be
> considered critical paths: __speculation_ctrl_update() and vmx_l1d_flush().
>
> Given these facts, changing static_cpu_has to boot_cpu_has is done in
> order to bypass alternative instructions which cannot be updated at runtime
> for now.
Not going to happen. We are not adding 4 conditionals to context switch
just to support that late loading horrors. There are better ways to do
that.
Thanks,
tglx
next prev parent reply other threads:[~2020-07-06 14:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-02 15:18 [PATCH RFC 0/7] CPU feature evaluation after microcode late loading Mihai Carabas
2020-07-02 15:18 ` [PATCH RFC 1/7] x86: cpu: bugs.c: remove init attribute from functions and variables Mihai Carabas
2020-07-02 15:18 ` [PATCH RFC 2/7] x86: cpu: modify boot_command_line to saved_command_line Mihai Carabas
2020-07-02 15:18 ` [PATCH RFC 3/7] x86: kernel: cpu: bugs.c: modify static_cpu_has to boot_cpu_has Mihai Carabas
2020-07-06 14:46 ` Thomas Gleixner [this message]
2020-07-02 15:18 ` [PATCH RFC 4/7] x86: cpu: bugs.c: update cpu_smt_disable to be callable at runtime Mihai Carabas
2020-07-02 15:18 ` [PATCH RFC 5/7] x86: microcode: late loading feature and bug evaluation Mihai Carabas
2020-07-02 15:18 ` [PATCH RFC 6/7] x86: cpu: bugs.c: reprobe bugs at runtime Mihai Carabas
2020-07-02 15:18 ` [PATCH RFC 7/7] x86: cpu: update blacklist spec features for late loading Mihai Carabas
2020-07-02 18:42 ` [PATCH RFC 0/7] CPU feature evaluation after microcode " Sean Christopherson
2020-07-06 15:15 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tuykr99y.fsf@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=boris.ostrovsky@oracle.com \
--cc=bp@alien8.de \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mihai.carabas@oracle.com \
--cc=mingo@redhat.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox