Skip to contentSkip to conversation

setting jiffies as the clocksource stops time

DISCUSSION Balaji Rao 4 participants 7 messages Jan 16, 2008 – Jan 18, 2008

lore
Share & tools
lore

Balaji Rao

author
#0 lore raw

Hi,

When i set jiffies as the current_clocksource, date(1) tells me that wallclock time has stopped, and soon after that, the system becomes unresponsive. This is not seen with CONFIG_NO_HZ disabled.

This happens in 2.6.24-rc4,rc5, and even in rc8.

I wonder how can jiffies be used as a clocksource.. Its value depends on the tick and when we turn off ticks, we would stop incrementing jiffies and when we come come out of idle, we update the jiffies by reading the current_clocksource which now is 'jiffies', and hence jiffies wouldn't get updated. Could this be the explanation ?

I also encountered the same problem when i ran the kernel in qemu, and set pit as the current_clocksource. Why does this happen ?

So, i think should we unregister jiffies as a clocksource when we go into NO_HZ ?

Thomas, Ingo what are your thoughts on this ?

regards,
balaji rao

#1 lore raw
Quoted 4 lines · Balaji Rao

When i set jiffies as the current_clocksource, date(1) tells me that wallclock time has stopped, and soon after that, the system becomes unresponsive. This is not seen with CONFIG_NO_HZ disabled.

This happens in 2.6.24-rc4,rc5, and even in rc8.

It happens since 2.6.21-rc1 on 32 bit.

Quoted 1 line

Thomas, Ingo what are your thoughts on this ?

http://lkml.org/lkml/2008/1/16/123

Thanks,
tglx

#2 lore raw
In reply to Balaji Rao
Quoted 10 lines · Balaji Rao

Hi,

When i set jiffies as the current_clocksource, date(1) tells me that wallclock time has stopped, and soon after that, the system becomes unresponsive. This is not seen with CONFIG_NO_HZ disabled.

This happens in 2.6.24-rc4,rc5, and even in rc8.

I wonder how can jiffies be used as a clocksource.. Its value depends on the tick and when we turn off ticks, we would stop incrementing jiffies and when we come come out of idle, we update the jiffies by reading the current_clocksource which now is 'jiffies', and hence jiffies wouldn't get updated. Could this be the explanation ?

Your right, It can't be used as a clocksource with nohz , and the system will refuse to automatically switch to it ..

However, you can manually override the system, which is what your doing .. That in turn forces the usage of an unstable clock which causes your time and system not to function any more..

Daniel

#3 lore raw
Quoted 14 lines · Daniel Walker
Quoted 6 lines · Balaji Rao

Hi,

When i set jiffies as the current_clocksource, date(1) tells me that wallclock time has stopped, and soon after that, the system becomes unresponsive. This is not seen with CONFIG_NO_HZ disabled.

Quoted 6 lines

I wonder how can jiffies be used as a clocksource.. Its value depends on the tick and when we turn off ticks, we would stop incrementing jiffies and when we come come out of idle, we update the jiffies by reading the current_clocksource which now is 'jiffies', and hence jiffies wouldn't get updated. Could this be the explanation ?

Quoted 2 lines

Your right, It can't be used as a clocksource with nohz , and the system will refuse to automatically switch to it ..

I think that manually changing to jiffies by echoing into sysfs should also be prohibited.

#4 lore raw
Quoted 15 lines · Jan Engelhardt
Quoted 14 lines · Daniel Walker
Quoted 12 lines · Balaji Rao

Hi,

When i set jiffies as the current_clocksource, date(1) tells me that wallclock time has stopped, and soon after that, the system becomes unresponsive. This is not seen with CONFIG_NO_HZ disabled.

I wonder how can jiffies be used as a clocksource.. Its value depends on the tick and when we turn off ticks, we would stop incrementing jiffies and when we come come out of idle, we update the jiffies by reading the current_clocksource which now is 'jiffies', and hence jiffies wouldn't get updated. Could this be the explanation ?

Quoted 5 lines
Quoted 2 lines

Your right, It can't be used as a clocksource with nohz , and the system will refuse to automatically switch to it ..

I think that manually changing to jiffies by echoing into sysfs should also be prohibited.

Yeah, I wasn't suggesting we shouldn't prevent it .. However, there are tons of way to kill your system by manual changing things ..

Daniel

author
#5 lore raw
In reply to Jan Engelhardt
Quoted 16 lines · Jan Engelhardt
Quoted 14 lines · Daniel Walker
Quoted 12 lines · Balaji Rao

Hi,

When i set jiffies as the current_clocksource, date(1) tells me that wallclock time has stopped, and soon after that, the system becomes unresponsive. This is not seen with CONFIG_NO_HZ disabled.

I wonder how can jiffies be used as a clocksource.. Its value depends on the tick and when we turn off ticks, we would stop incrementing jiffies and when we come come out of idle, we update the jiffies by reading the current_clocksource which now is 'jiffies', and hence jiffies wouldn't get updated. Could this be the explanation ?

Quoted 6 lines
Quoted 2 lines

Your right, It can't be used as a clocksource with nohz , and the system will refuse to automatically switch to it ..

I think that manually changing to jiffies by echoing into sysfs should also be prohibited.

Yea, right. But why not unregister jiffies as a clocksource itself when we get into NO_HZ ? I think it's much cleaner provided it has no other consequences.

#6 lore raw
Quoted 17 lines · Balaji Rao
Quoted 16 lines · Jan Engelhardt
Quoted 14 lines · Daniel Walker
Quoted 12 lines · Balaji Rao

Hi,

When i set jiffies as the current_clocksource, date(1) tells me that wallclock time has stopped, and soon after that, the system becomes unresponsive. This is not seen with CONFIG_NO_HZ disabled.

I wonder how can jiffies be used as a clocksource.. Its value depends on the tick and when we turn off ticks, we would stop incrementing jiffies and when we come come out of idle, we update the jiffies by reading the current_clocksource which now is 'jiffies', and hence jiffies wouldn't get updated. Could this be the explanation ?

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Your right, It can't be used as a clocksource with nohz , and the system will refuse to automatically switch to it ..

I think that manually changing to jiffies by echoing into sysfs should also be prohibited.

Yea, right. But why not unregister jiffies as a clocksource itself when we get into NO_HZ ? I think it's much cleaner provided it has no other consequences.

As I said before. I have a patch lined up for the same issue vs. PIT clocksource and I'm adding that for jiffies as well. It's just not an urgent issue, which needs to go into .24

Thanks

tglx