如果把时钟中断关掉 ,会引起什么后果?

107 views
Skip to first unread message

xx

unread,
Jul 12, 2011, 4:24:15 AM7/12/11
to sh...@googlegroups.com, Zh-Kernel
RT.

首先,进程调度是不是就失效了?
其次,...

希望大家讨论下。
_______________________________________________
Linux 内核开发中文邮件列表
Linux-...@zh-kernel.org
http://zh-kernel.org/mailman/listinfo/linux-kernel
Linux 内核开发中文社区: http://zh-kernel.org

徐阳

unread,
Jul 12, 2011, 4:59:41 AM7/12/11
to xx, Zh-Kernel, sh...@googlegroups.com
jiffies、HZ相关的内核定时机制没有了

2.6.21内核开始支持无滴答内核,CONFIG_NO_HZ

Gang Lei (雷刚)

unread,
Jul 12, 2011, 9:37:20 PM7/12/11
to 徐阳, xx, Zh-Kernel, sh...@googlegroups.com
Tickless内核并不是指完全没有tick吧?
我的理解是使用到了tick相关服务的时候才会产生定时中断,当整个kernel没有使用到tick服务时才关掉。

Cunsuo Guo

unread,
Jul 12, 2011, 9:58:23 PM7/12/11
to Gang Lei (雷刚), Zh-Kernel, sh...@googlegroups.com
在 2011年7月13日 上午9:37,Gang Lei (雷刚) <gang...@mediatek.com> 写道:
> Tickless内核并不是指完全没有tick吧?
> 我的理解是使用到了tick相关服务的时候才会产生定时中断,当整个kernel没有使用到tick服务时才关掉。
>
> From: linux-kern...@zh-kernel.org [mailto:linux-kern...@zh-kernel.org] On Behalf Of 徐阳
> Sent: 2011年7月12日 17:00
> To: xx
> Cc: Zh-Kernel; sh...@googlegroups.com
> Subject: Re: 如果把时钟中断关掉 ,会引起什么后果?
>
>
> jiffies、HZ相关的内核定时机制没有了
>
> 2.6.21内核开始支持无滴答内核,CONFIG_NO_HZ
>
> 在 2011年7月12日 下午4:24,xx <xx.k...@gmail.com>写道:
>
>> RT.
>>
>> 首先,进程调度是不是就失效了?
>> 其次,...
>>
>> 希望大家讨论下。
内核没有时钟中断,就像人没有心跳。

xx

unread,
Jul 12, 2011, 10:08:56 PM7/12/11
to Cunsuo Guo, Zh-Kernel
恩,把时钟中断关掉,到系统down掉,这中间的过程能否具体化一下?

2011/7/13 Cunsuo Guo <cunsu...@gmail.com>

Zhi-zhou Zhang

unread,
Jul 14, 2011, 8:41:35 PM7/14/11
to xx, Zh-Kernel
我以前做过测试,禁用中断十几秒钟,发现系统时钟会停止。系统卡住不动
我一直有一个困惑,在内核中关中断的代码那么多,根据概率论,总会有时钟中断丢失,而在计算机的世界里哪怕是万分之一的概率也可能几秒就发生一次,那这样的话,计算机凭什么保证不丢失时钟中断,维护系统时钟呢?

2011/7/13 xx <xx.k...@gmail.com>

xx

unread,
Jul 14, 2011, 8:43:45 PM7/14/11
to Zhi-zhou Zhang, Zh-Kernel
2011/7/15 Zhi-zhou Zhang <eto...@gmail.com>

> 我以前做过测试,禁用中断十几秒钟,发现系统时钟会停止。系统卡住不动
>
> 我一直有一个困惑,在内核中关中断的代码那么多,根据概率论,总会有时钟中断丢失,而在计算机的世界里哪怕是万分之一的概率也可能几秒就发生一次,那这样的话,计算机凭什么保证不丢失时钟中断,维护系统时钟呢?
>
>

内核存在丢失时钟中断的情况,但可以去维护。具体细节我不太清楚。

徐阳

unread,
Jul 14, 2011, 10:23:32 PM7/14/11
to xx, Zh-Kernel
x86上有tsc时间戳寄存器,2.6.17前可以使用mark_offset_tec通过读取tsc,计算后找回丢失的时钟中断,不知道为什么后面版本就没有了
Reply all
Reply to author
Forward
0 new messages