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" <mr.yuke@xxxxxxxxx>
Date: Thu, 30 Oct 2008 20:47:06 +0800
Cc: "Liu, Jinsong" <jinsong.liu@xxxxxxxxx>, "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Wei, Gang" <gang.wei@xxxxxxxxx>, "Yu, Ke" <ke.yu@xxxxxxxxx>
Delivery-date: Thu, 30 Oct 2008 05:47:28 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=BIZEH5zOnjz8r7YX+JxdqCvJWd6n9svHXU35AyCeMho=; b=dTqiU/sVJdBJj4GJRypO6UUOTJlePlS3fDHZfkFSmz5ch+2inL7j5Ru6RfGwEctrNE GiCk4q09Kn9jb5qjVxmeecfAe58poP5rn6r6JrINczywNkZM75gsFp6Jkx4EpGopJXDx 4BjeWcZSihe2ebkhuru60AJcJLGfnS2kA7YY4=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=FMRn1IsdTPqHvu4PkMpmm54Z7Ud8wmrJsaPI72ebnIJ78ftfHEdKpA9Spx5Lg4VQN2 57tpBSGx9Ma3eLIBjGCWZYBvkPgg71+3pYlKm6MBd3VcH2RBgDb6ZXh9dvt75si93OC9 ezrRCGRPdNNWUJjqU0CVDLvZ828jWNHBnfeGQ=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C52F20B5.1EABA%keir.fraser@xxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
2008/10/30 Keir Fraser <keir.fraser@xxxxxxxxxxxxx>:
> On 30/10/08 08:08, "Yu, Ke" <ke.yu@xxxxxxxxx> wrote:
>
>>> Increasing SLOP to 1ms should have the the similar 5% gain, as your
>>> analysis, it is the worst case of range timer application in vpt. I
>>> can redo the measurement to double confirm.
>>
>> I have finished the measurement, when TIME_SLOP increase to 1ms, there is
>> similar power consumption gain, this time it is 4% (14.0W vs 14.6W) . By
>> theory 1ms TIMER_SLOP should have more gain than the range timer. The
>> diferrence may be due to the test environment noise.
>
> It may also be because your patch tends to delay the timer deadline
> somewhat, and so by the time it goes off you actually sometimes have one or
> two more timers you can deliver in the batch? OTOH it could be experimental
> noise as you suggest, and certainly this change gets us pretty close to your
> win. We'd have to do further experiments to see if increasing TIMER_SLOP
> noticeably degrades system performance, but we'd need to do that with the
> range-timer approach too.

oh yes, you remind me that the range timer also has 50ns TIMER_SLOP,
this may also help. and yes, I am doing the range timer performance
test, to make sure it does not hurt performance. I can also test the
performance of 1ms TIMER_SLOP.

>
> One thing: as Dan pointed out, some things don't want to get their timeout
> early, but generally callers are much more tolerant of getting timeouts a
> bit late. Possibly we should set the timer_deadline to nearest timeout +
> TIMER_SLOP, and then when executing timers be strict about not executing
> timers early (or at least no more than the existing 50us 'mini' slop)?

yes, this way can avoid the issue Dan pointed out.

>
> 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] :)

Best Regards
Ke

>
> I'm thinking out loud. :-)
>
>  -- Keir
>

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