lkml.org 
[lkml]   [2022]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/2] timers: retpoline mitigation for time funcs
Date
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





\
 
 \ /
  Last update: 2022-04-11 13:12    [W:0.054 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site