Re: sched/isolation: tick_take_do_timer_from_boot() calls smp_call_function_single() with irqs disabled

Thomas Gleixner
2024-05-27T16:13:03Z

On Mon, May 27 2024 at 21:01, Nicholas Piggin wrote:
> On Mon May 27, 2024 at 5:27 AM AEST, Oleg Nesterov wrote:
>> The more I grep the more I confused.
>>
>> On 05/25, Thomas Gleixner wrote:
>> >
>> > Right. It does not happen because the kernel starts with jiffies as
>> > clocksource except on S390. The jiffies clocksource is not qualified to
>> > switch over to NOHZ mode for obvious reasons.
>>
>> Not obvious for those who never looked at this code ;)
>>
>> OK, clocksource_jiffies doesn't have CLOCK_SOURCE_VALID_FOR_HRES,
>
> jiffies clocksource requires a timer to run it I suppose.

Yes, but it's all periodic (nohz disabled) mode until
clocksource_done_booting() selects a high resolution clocksource and
kicks the NOHZ stuff alive. That's a fs_initcall() and happens late in
the boot process.

Thanks,

tglx