Messages in this thread |  | | Date | Thu, 31 Jan 2013 13:21:18 -0800 | From | Andrew Morton <> | Subject | Re: [PATCH] printk: Avoid softlockups in console_unlock() |
| |
On Thu, 31 Jan 2013 13:14:05 +0530 anish singh <anish198519851985@gmail.com> wrote:
> > If it does need ratelimiting, I'd worry about using jiffies for that. > > If the kernel is spending a long time with interrupts disabled, jiffies > > might not be incrementing. Using the CPU timestamp would be better > > (eg, sched_clock()). > > http://lxr.free-electrons.com/source/kernel/sched/clock.c#L75 > I am puzzled because of this definition(above link).Sched_clock is > dependent on jiffies and jiffies is blocked so how sched_clock would > be better(I am 100% missing something very obvious)? > > Is it that sched_clock is not dependent on jiffies?
yes, I think sched_clock is dependent on jiffies for some architectures.
I was really using sched_clock as a place-filler for "some timer which keeps running when interrupts are disabled" ;) I'm not really sure what that would be nowadays - even get_cycles() isn't implemented on some architectures. I guess some architectures will need a lame fallback or some sort.
|  |