[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87mtgrg9pf.ffs@tglx>
Date: Mon, 11 Apr 2022 13:07:08 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Pete Swain <swine@...gle.com>
Cc: Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Sean Christopherson <seanjc@...gle.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>,
John Stultz <john.stultz@...aro.org>,
Stephen Boyd <sboyd@...nel.org>,
"Maciej W. Rozycki" <macro@...am.me.uk>,
Johan Hovold <johan@...nel.org>,
Feng Tang <feng.tang@...el.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
Juergen Gross <jgross@...e.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org, Pete Swain <swine@...gle.com>
Subject: Re: [PATCH 2/2] timers: retpoline mitigation for time funcs
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
Powered by blists - more mailing lists