<div dir="ltr"><div>(I'm talking now about MONOTONIC_CLOCK_RAW, not taking NTP adjustment into account)</div><div><br></div>To my understanding, the basic time counting mechanism at the Linux kernel, is the jiffies counter. The way it counts time, is by leveraging a CPU interrupt happening at a certain known frequency. Every time this interrupt occurs, the interrupt handler would increment a counter. By multiplying this counter with the IRQ's frequency, we can estimate how much time passed.<div>
<br></div><div>Now, to my understanding, the NO_HZ_IDLE=y configuration, would prevent any interrupt on idle CPUs. </div><div><br></div><div><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex" class="gmail_quote">
The CONFIG_NO_HZ_IDLE=y Kconfig option causes the kernel to avoid sending<br>scheduling-clock interrupts to idle CPUs</blockquote></div><div><a href="https://www.kernel.org/doc/Documentation/timers/NO_HZ.txt">https://www.kernel.org/doc/Documentation/timers/NO_HZ.txt</a><br>
</div><div><br></div><div>So to my understanding, if all CPUs are idle, nothing is going to run on any CPU.</div><div><br></div><div>Who would count jiffies then? How can we be sure how much time passed with no hardware clock (as it is the case in some systems), and all CPUs asleep?</div>
<div><br></div><div dir="rtl">לינוקס נוסעת מפרשיה שניים,</div><div dir="rtl">ומעבדיה נרדמו כולם.</div><div dir="rtl">אם לא יעורו כל מעבדיה,</div><div dir="rtl">איכה תמנה, כמה עברו שניות?</div></div>