From: Thomas Gleixner <tglx@linutronix.de>
To: Pete Swain <swine@google.com>
Cc: Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Sean Christopherson <seanjc@google.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
John Stultz <john.stultz@linaro.org>,
Stephen Boyd <sboyd@kernel.org>,
"Maciej W. Rozycki" <macro@orcam.me.uk>,
Johan Hovold <johan@kernel.org>, Feng Tang <feng.tang@intel.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
Juergen Gross <jgross@suse.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
Pete Swain <swine@google.com>
Subject: Re: [PATCH 2/2] timers: retpoline mitigation for time funcs
Date: Mon, 11 Apr 2022 13:07:08 +0200 [thread overview]
Message-ID: <87mtgrg9pf.ffs@tglx> (raw)
In-Reply-To: <87r165gmoz.ffs@tglx>
On Sun, Apr 10 2022 at 14:14, Thomas Gleixner wrote:
> On Fri, Feb 18 2022 at 14:18, Pete Swain wrote:
>> @@ -245,7 +245,8 @@ static int clockevents_program_min_delta(struct clock_event_device *dev)
>>
>> dev->retries++;
>> clc = ((unsigned long long) delta * dev->mult) >> dev->shift;
>> - if (dev->set_next_event((unsigned long) clc, dev) == 0)
>> + if (INDIRECT_CALL_1(dev->set_next_event, lapic_next_deadline,
>> + (unsigned long) clc, dev) == 0)
>
> No. We are not sprinkling x86'isms into generic code.
Even if we would do that, then this is completely useless.
The hotpath function is clockevents_program_event() and not
clockevents_program_min_delta().
The latter is invoked from the former if the to be programmed event is
in the past _and_ the force argument is set, i.e. in 0.1% of the
invocations of clockevents_program_event(), which itself has an indirect
call to dev->set_next_event().
If your profiles show clockevents_program_min_delta() as dominant, then
there is something massively wrong with your kernel.
Thanks,
tglx
next prev parent reply other threads:[~2022-04-11 11:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-18 22:18 [PATCH 1/2] kvm/x86: rename kvm's read_tsc() as kvm_read_host_tsc() Pete Swain
2022-02-18 22:18 ` [PATCH 2/2] timers: retpoline mitigation for time funcs Pete Swain
2022-04-10 12:14 ` Thomas Gleixner
2022-04-11 9:21 ` Thomas Gleixner
2022-04-11 11:07 ` Thomas Gleixner [this message]
2022-02-18 22:49 ` [PATCH 1/2] kvm/x86: rename kvm's read_tsc() as kvm_read_host_tsc() Jim Mattson
2022-02-19 8:40 ` Paolo Bonzini
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=87mtgrg9pf.ffs@tglx \
--to=tglx@linutronix.de \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=feng.tang@intel.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=jmattson@google.com \
--cc=johan@kernel.org \
--cc=john.stultz@linaro.org \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@orcam.me.uk \
--cc=mingo@redhat.com \
--cc=paulmck@kernel.org \
--cc=pbonzini@redhat.com \
--cc=sboyd@kernel.org \
--cc=seanjc@google.com \
--cc=swine@google.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.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