Re: Who's counting jiffies when all CPUs idle in NO_HZ mode?

2014-04-10 Thread E.S. Rosenberg
Don't we rely heavily on network time these days too? Your cellphone would also not be a real example since: 1. It is always a bit active polling the antennae in it's range and possibly doing scheduled tasks like polling a mailserver/calendar server etc. 2. The cellphone definitely has network

Re: Who's counting jiffies when all CPUs idle in NO_HZ mode?

2014-03-26 Thread Elazar Leibovich
(If you've been at the office yesterday, maybe I wouldn't have send the question ;-) You've followed my line of thought (thinking that there's always one CPU active). In some cases I think all CPUs must be asleep (otherwise, my Android's battery would be draining even after I press the power

Who's counting jiffies when all CPUs idle in NO_HZ mode?

2014-03-25 Thread Elazar Leibovich
(I'm talking now about MONOTONIC_CLOCK_RAW, not taking NTP adjustment into account) 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

Re: Who's counting jiffies when all CPUs idle in NO_HZ mode?

2014-03-25 Thread Oleg Goldshmidt
Elazar Leibovich elaz...@gmail.com writes: So to my understanding, if all CPUs are idle, nothing is going to run on any CPU. Well, there are a few special system processes on every UNIX system: * swapper/scheduler (pid == 0); NB: this guy is not created by fork(2), hence there is no

Re: Who's counting jiffies when all CPUs idle in NO_HZ mode?

2014-03-25 Thread Shachar Shemesh
So I answer this here, and then I get a visit in the office with the same question... :-) On 25/03/14 23:04, Elazar Leibovich wrote: (I'm talking now about MONOTONIC_CLOCK_RAW, not taking NTP adjustment into account) To my understanding, the basic time counting mechanism at the Linux kernel,

Re: Who's counting jiffies when all CPUs idle in NO_HZ mode?

2014-03-25 Thread Shachar Shemesh
Oops! 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. Shachar On 26/03/14 06:38, Shachar Shemesh wrote: So I answer this