WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] [PATCH 0/2] range timer support

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH 0/2] range timer support
From: "Yu, Ke" <ke.yu@xxxxxxxxx>
Date: Fri, 31 Oct 2008 10:23:22 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "Liu, Jinsong" <jinsong.liu@xxxxxxxxx>, "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Wei, Gang" <gang.wei@xxxxxxxxx>
Delivery-date: Thu, 30 Oct 2008 19:24:21 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <631d03500810300547h1b426dbaie20f148f62a4f4b3@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <49582C73AC36CC4C8C6C42390304E81C092FCF4709@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C52F20B5.1EABA%keir.fraser@xxxxxxxxxxxxx> <631d03500810300547h1b426dbaie20f148f62a4f4b3@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Ack6jbEldlUAQneTThGFgUljC8f6ygAa6sUw
Thread-topic: [Xen-devel] [PATCH 0/2] range timer support
Yu Ke wrote:
> 2008/10/30 Keir Fraser <keir.fraser@xxxxxxxxxxxxx>:
>> On 30/10/08 08:08, "Yu, Ke" <ke.yu@xxxxxxxxx> wrote:
>> 
>> 
>> Or perhaps actually having range timers in timer.c is worthwhile for
>> future extensions and for now we can just set every timer to
>> [deadline, deadline+configurable_global_slop]. Then the existing
>> range-timer mechanism ought to find a sensible deadline to aim for,
>> only delaying timer events when there is a benefit to doing so.
> 
> I am fine with configurable global slop, although some timer may not
> benefit much from this. e.g. the 50HZ (20ms) cpufreq DBS timer, whose
> timer range can be at least [deadline, deadline+5ms] :)
> 

Looks I misunderstand your points. Do you mean using the range timer 
implementation to implement the interface of [deadline, 
deadline+configurable_global_slop]? If so, I would more prefer this approach 
and would be happy to revise the patch:)  Compared to the first approach, i.e. 
setting the timer_deadline to nearest timeout +TIMER_SLOP TIME_SLOP , range 
timer implementation does have advantage. In the first approach, the timer 
would be always delayed, even when those timers are aligned. While range timer 
would only delay those timer at the first time, and then would expires without 
delay. 

For example, think about two 250HZ timers t1, t2, which will expire at T and 
T+1ms. Suppose TIMER_SLOP is 1ms, and suppose apic timer deadline is set to 
T+1ms. 
In the first apporach,  the apic timer will expire at:
T+1ms: t1 and t2 is executed, and deadline become T+1ms+4ms, and apic timer 
deadline is set to T+1ms+4ms+TIMER_SLOP (T+6ms)
T+6ms: t1 and t2 is executed, and dealine become T+6ms+4ms, and apic timder 
deadline is set to T+6ms+4ms+TIMER_SLOP (T+11ms)
T+11ms:......

In the range timer appraoch, the apic timer will expire at:
T+1ms: t1 and t2 is executed, and deadline range become [T+5ms, T+6ms], and 
apic timder deadline is set to T+5ms
T+5ms: t1 and t2 is executed, and deadline range become [T+9ms, T+10ms], and 
apic timder deadline is set to T+9ms
T+9ms: ......

>From the above scenario, we can see t1 and t2 is always delayed for 1ms in the 
>first approach, while not in range timer approach. so range timer is more 
>close to the semantic of original timer.

Best Regards
Ke


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel