<html style="direction: ltr;">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<style type="text/css">body p { margin-bottom: 0.2cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="UTF-8" bgcolor="#FFFFFF"
text="#000000">
<div class="moz-cite-prefix">Oops!<br>
<br>
The "one cpu always active" relates to the "full" tickless, not to
the idle tickless. Please disregard that answer, except the use of
the hardware clocks. I believe it is still valid, but I'll need to
look at the source code.<br>
<br>
Shachar<br>
<br>
On 26/03/14 06:38, Shachar Shemesh wrote:<br>
</div>
<blockquote cite="mid:533259AB.4010704@shemesh.biz" type="cite">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<style type="text/css">body p { margin-bottom: 0.2cm; margin-top: 0pt; } </style>
<div class="moz-cite-prefix">So I answer this here, and then I get
a visit in the office with the same question... :-)<br>
<br>
On 25/03/14 23:04, Elazar Leibovich wrote:<br>
</div>
<blockquote
cite="mid:CAHNTFmKo86OAC-1vG88H_UsAHUD0mv3+aa62GsertjKV2r52VA@mail.gmail.com"
type="cite">
<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. <br>
</div>
</div>
</blockquote>
At least for the time being, this does not mean what you think it
means. See <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://lwn.net/Articles/549580/">http://lwn.net/Articles/549580/</a><br>
<br>
Even in full tickless mode (properly referred to as "full"
tickless mode), the boot CPU is still on a counter. Full
ticklessness is still some way away.<br>
<br>
Even when we do achieve that lofty goal, most CPUs have a hardware
counter that counts the time. Just like NAPI for network moved
from an interrupt mode to polling mode for performance's sake, so
we can do here.<br>
<blockquote
cite="mid:CAHNTFmKo86OAC-1vG88H_UsAHUD0mv3+aa62GsertjKV2r52VA@mail.gmail.com"
type="cite">
<div dir="ltr"><br>
<div>So to my understanding, if all CPUs are idle, nothing is
going to run on any CPU.</div>
<div><br>
</div>
</div>
</blockquote>
No.<br>
<blockquote
cite="mid:CAHNTFmKo86OAC-1vG88H_UsAHUD0mv3+aa62GsertjKV2r52VA@mail.gmail.com"
type="cite">
<div dir="ltr">
<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>
</blockquote>
When we finally move into the utopian full tickless mode, jiffies
will lose their original meaning. In full tickless mode, there is
no base frequency for the clock. As such, jiffies become an
arbitrary number based on which you can decide how much time has
passed, and can be set to whatever. How low to set them becomes a
question of power management, then.<br>
<br>
Shachar<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Linux-il mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a>
<a class="moz-txt-link-freetext" href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a>
</pre>
</blockquote>
<br>
</body>
</html>