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] X86: Prefer TSC-deadline timer in Xen

To: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] X86: Prefer TSC-deadline timer in Xen
From: "Wei, Gang" <gang.wei@xxxxxxxxx>
Date: Thu, 28 Oct 2010 23:01:30 +0800
Accept-language: zh-CN, en-US
Acceptlanguage: zh-CN, en-US
Cc: "Brown, Len" <len.brown@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>, "Wei, Gang" <gang.wei@xxxxxxxxx>
Delivery-date: Thu, 28 Oct 2010 08:06:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20101028142232.GB11016@xxxxxxxxxxxxxxxxxxxxxxx>
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: <F26D193E20BBDC42A43B611D1BDEDE71218A98966A@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4CC94671020000780001FA65@xxxxxxxxxxxxxxxxxx> <F26D193E20BBDC42A43B611D1BDEDE71218A98983A@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4CC97DDF020000780001FBCA@xxxxxxxxxxxxxxxxxx> <F26D193E20BBDC42A43B611D1BDEDE71218A98988A@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20101028142232.GB11016@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Act2q5ID0/xT7FLFR9+X1JI6ABvZ8QABGcng
Thread-topic: [Xen-devel] [PATCH] X86: Prefer TSC-deadline timer in Xen
> Tim Deegan [mailto:Tim.Deegan@xxxxxxxxxx], Thursday, October 28, 2010 10:23 PM
...
> > > >> > +static int tdt_enabled;
> > > >> > +static int tdt_disable;
> > > >> > +boolean_param("tdt_off", tdt_disable);
> > > >>
> > > >> It would be more natural to call the parameter just "tdt", and
> > > >> use a non-zero initialized variable that gets set to zero when
> > > >> the user passes "tdt=off" (or another of the boolean false
> > > >> indicators). Perhaps you could even get away with just the
> > > >> single "tdt_enabled" variable then.
> > > >
> > > > Rename the parameter should be ok. But I prefer to keep two variable
> there
> > > > to avoid check both tdt_enabled &
> > > boot_cpu_has(X86_FEATURE_TSC_DEADLINE)
> > > > everywhere.
> > >
> > > Why? Just clear tdt_enabled when you find
> > > !boot_cpu_has(X86_FEATURE_TSC_DEADLINE) during initialization.
> > >
> > > And btw., this (or if you really want to keep them separate, both)
> > > variable(s) are pretty reasonable candidates for __read_mostly.
> >
> > I still want to keep them because __setup_APIC_LVTT() will be called
> > multiple times - the first call with tdt_enabled == false, and the
> > following calls with tdt_enabled == true.
> 
> Is that important?  If so, please add explanatory comments in the
> appropriate places, because it's not obvious that it's happening, or why.

Think it again, I should remove tdt_enable and just keep tdt_enabled, and skip 
calibrate_APIC_clock() while tdt_enabled & 
boot_cpu_has(X86_FEATURE_TSC_DEADLINE). Thus things become simpler.

Jimmy

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