LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: what's wrong ??

To: Wang Haiguang <wanghaig@xxxxxxxxxxxxxxx>
Subject: Re: what's wrong ??
Cc: LVS <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
From: Wensong Zhang <wensong@xxxxxxxxxxxx>
Date: Mon, 30 Oct 2000 23:04:21 +0800 (CST)

On Mon, 30 Oct 2000, Wang Haiguang wrote:

> 
> Waht is the meaning of following code in vs:
> 
> #define TVN_BITS 6
> #define TVR_BITS 8
> 

TVN stands for Timer Vector Number, and TVR stands for Timer Vector
Root. The slower timer code is mostly taken from linux/kernel/timer.c.

Look at the linux/kernel/timer.c, you can see timer handling is just
like a clock. For example, timers can be set from 1 seconds to 12 hours,
so those timers can be hooked at second wheel, minute wheel and hour
wheel. When second hand moves forward one second, timers which second
wheel points to are expired. When second hand turns a round, then minute
handle move forward, and timers which minute hand point to are cascaded
to second wheel. So does hour hand.

Hope that this example can help you understand timer handling.

Wensong

> Thanks
> 
> 
> 
> 
> 



<Prev in Thread] Current Thread [Next in Thread>