Linus Torvalds wrote:

I wonder if the whole "round_jiffies()" thing should be written so that it never rounds down, or at least never rounds down to before the current second!

that's what it is supposed to do already...

166
167         if (j <= jiffies) /* rounding ate our timeout entirely; */
168                 return original;
169         return j;
170 }

so there is always a gap of at least 1 jiffie no matter what



I have to say, I also think it's a bit iffy to do "round_jiffies()" at all in that per-CPU kind of way. The "per-cpu" thing is quite possibly going to change by the time we actually add the timer, so the goal of trying to get wakeups to happen in "bunches" per CPU should really be done by setting a flag on the timer itself - so that we could do that rounding when the timer is actually added to the per-cpu queues!

it's pretty much the same thing though
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to