lkml.org 
[lkml]   [2021]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 3/5] tick/broadcast: Prefer per-cpu oneshot wakeup timers to broadcast
Date
On Fri, May 21 2021 at 12:25, Will Deacon wrote:
> On Fri, May 21, 2021 at 05:25:41AM +0300, Mika Penttilä wrote:
>> On 20.5.2021 21.47, Will Deacon wrote:
>> > /*
>> > * Conditionally install/replace broadcast device
>> > */
>> > -void tick_install_broadcast_device(struct clock_event_device *dev)
>> > +void tick_install_broadcast_device(struct clock_event_device *dev, int cpu)
>> > {
>> > struct clock_event_device *cur = tick_broadcast_device.evtdev;
>> > + if (tick_set_oneshot_wakeup_device(dev, cpu))
>> > + return;
>> > +
>> > if (!tick_check_broadcast_device(cur, dev))
>> > return;
>>
>> Does this disable hpet registering as a global broadcast device on x86 ? I
>> think it starts with cpumask = cpu0 so it qualifies for a percpu wakeup
>> timer.
>
> Well spotted, I think you're probably right. I'll try to reproduce on my
> laptop to confirm, but I hadn't noticed the tricks played with the cpumask
> on x86.
>
> I'll probably need to rework things so that we install the broadcast timer
> first, but prefer global devices.

HPET has cpumask(0) but does not have CLOCK_EVT_FEAT_PERCPU set. The
feature flag is a clear indicator for per cpu.

Thanks,

tglx

\
 
 \ /
  Last update: 2021-05-21 15:50    [W:0.170 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site