mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* setting jiffies as the clocksource stops time
@ 2008-01-16 20:39 Balaji Rao
  2008-01-16 21:20 ` Daniel Walker
  2008-01-16 21:23 ` Thomas Gleixner
  0 siblings, 2 replies; 7+ messages in thread
From: Balaji Rao @ 2008-01-16 20:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Thomas Gleixner

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: setting jiffies as the clocksource stops time
  2008-01-16 20:39 setting jiffies as the clocksource stops time Balaji Rao
@ 2008-01-16 21:20 ` Daniel Walker
  2008-01-17 22:34   ` Jan Engelhardt
  2008-01-16 21:23 ` Thomas Gleixner
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel Walker @ 2008-01-16 21:20 UTC (permalink / raw)
  To: Balaji Rao; +Cc: linux-kernel, Ingo Molnar, Thomas Gleixner


On Thu, 2008-01-17 at 02:09 +0530, Balaji Rao wrote:
> 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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: setting jiffies as the clocksource stops time
  2008-01-16 20:39 setting jiffies as the clocksource stops time Balaji Rao
  2008-01-16 21:20 ` Daniel Walker
@ 2008-01-16 21:23 ` Thomas Gleixner
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas Gleixner @ 2008-01-16 21:23 UTC (permalink / raw)
  To: Balaji Rao; +Cc: linux-kernel, Ingo Molnar

On Thu, 17 Jan 2008, Balaji Rao wrote:
> 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.
 
> Thomas, Ingo what are your thoughts on this ?

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

Thanks,
	tglx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: setting jiffies as the clocksource stops time
  2008-01-16 21:20 ` Daniel Walker
@ 2008-01-17 22:34   ` Jan Engelhardt
  2008-01-17 22:39     ` Daniel Walker
  2008-01-18  6:11     ` Balaji Rao
  0 siblings, 2 replies; 7+ messages in thread
From: Jan Engelhardt @ 2008-01-17 22:34 UTC (permalink / raw)
  To: Daniel Walker; +Cc: Balaji Rao, linux-kernel, Ingo Molnar, Thomas Gleixner


On Jan 16 2008 13:20, Daniel Walker wrote:
>On Thu, 2008-01-17 at 02:09 +0530, Balaji Rao wrote:
>> 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 ?
>
>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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: setting jiffies as the clocksource stops time
  2008-01-17 22:34   ` Jan Engelhardt
@ 2008-01-17 22:39     ` Daniel Walker
  2008-01-18  6:11     ` Balaji Rao
  1 sibling, 0 replies; 7+ messages in thread
From: Daniel Walker @ 2008-01-17 22:39 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Balaji Rao, linux-kernel, Ingo Molnar, Thomas Gleixner


On Thu, 2008-01-17 at 23:34 +0100, Jan Engelhardt wrote:
> On Jan 16 2008 13:20, Daniel Walker wrote:
> >On Thu, 2008-01-17 at 02:09 +0530, Balaji Rao wrote:
> >> 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 ?
> >
> >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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: setting jiffies as the clocksource stops time
  2008-01-17 22:34   ` Jan Engelhardt
  2008-01-17 22:39     ` Daniel Walker
@ 2008-01-18  6:11     ` Balaji Rao
  2008-01-18 10:06       ` Thomas Gleixner
  1 sibling, 1 reply; 7+ messages in thread
From: Balaji Rao @ 2008-01-18  6:11 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Daniel Walker, linux-kernel, Ingo Molnar, Thomas Gleixner

On Friday 18 January 2008 04:04:33 am Jan Engelhardt wrote:
> 
> On Jan 16 2008 13:20, Daniel Walker wrote:
> >On Thu, 2008-01-17 at 02:09 +0530, Balaji Rao wrote:
> >> 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 ?
> >
> >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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: setting jiffies as the clocksource stops time
  2008-01-18  6:11     ` Balaji Rao
@ 2008-01-18 10:06       ` Thomas Gleixner
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Gleixner @ 2008-01-18 10:06 UTC (permalink / raw)
  To: Balaji Rao; +Cc: Jan Engelhardt, Daniel Walker, linux-kernel, Ingo Molnar

On Fri, 18 Jan 2008, Balaji Rao wrote:

> On Friday 18 January 2008 04:04:33 am Jan Engelhardt wrote:
> > 
> > On Jan 16 2008 13:20, Daniel Walker wrote:
> > >On Thu, 2008-01-17 at 02:09 +0530, Balaji Rao wrote:
> > >> 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 ?
> > >
> > >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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-01-18 10:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-16 20:39 setting jiffies as the clocksource stops time Balaji Rao
2008-01-16 21:20 ` Daniel Walker
2008-01-17 22:34   ` Jan Engelhardt
2008-01-17 22:39     ` Daniel Walker
2008-01-18  6:11     ` Balaji Rao
2008-01-18 10:06       ` Thomas Gleixner
2008-01-16 21:23 ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®