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] redundancy with timer function of balloon driver

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] redundancy with timer function of balloon driver
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Fri, 8 Jun 2007 17:32:56 +0100
Cc: Tej Parkash <tejparkash.d@xxxxxxxxx>
Delivery-date: Fri, 08 Jun 2007 09:30:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <2bd9ebfa0706060058h5b7feedfh2b088c9cc852527c@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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <2bd9ebfa0706060058h5b7feedfh2b088c9cc852527c@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6
> Code involved in balloon driver for scanning of xenstore has been
> implemented by polling with timer and event notification function.
>
> timer written like this:
>
> init_timer(&balloon_timer);
>    balloon_timer.data = 0;
>        balloon_timer.function = balloon_alarm;
>
> and other function realted to timer in balloon driver is
>
> mod_timer(&balloon_timer, jiffies + HZ);
>
> but there is no routine i have seen which make the timer activate by adding
>
> add_timer(&balloon_timer) in the balloon driver

Hi there,

From the comments in linux-2.6.18/kernel/timer.c::mod_timer():

 * mod_timer is a more efficient way to update the expire field of an
 * active timer (if the timer is inactive it will be activated)

So I guess the mod_timer call is also having the effect of activating the 
timer without using add_timer.  Does this sound right to you?

Cheers,
Mark

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

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

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