From: Mark Williamson Subject: Re: redundancy with timer function of balloon driver Date: Fri, 8 Jun 2007 17:32:56 +0100 Message-ID: <200706081732.56273.mark.williamson@cl.cam.ac.uk> References: <2bd9ebfa0706060058h5b7feedfh2b088c9cc852527c@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <2bd9ebfa0706060058h5b7feedfh2b088c9cc852527c@mail.gmail.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Tej Parkash List-Id: xen-devel@lists.xenproject.org > 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 =3D 0; > balloon_timer.function =3D 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 addi= ng > > add_timer(&balloon_timer) in the balloon driver Hi there, =46rom 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=20 timer without using add_timer. Does this sound right to you? Cheers, Mark =2D-=20 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!