From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tian, Kevin" Subject: Re: [PATCH v2 14/14] docs: Add descriptions of TSC scaling in xl.cfg and tscmode.txt Date: Thu, 10 Dec 2015 10:40:23 +0000 Message-ID: References: <1449435529-12989-1-git-send-email-haozhong.zhang@intel.com> <1449435529-12989-15-git-send-email-haozhong.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1449435529-12989-15-git-send-email-haozhong.zhang@intel.com> Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Zhang, Haozhong" , "xen-devel@lists.xen.org" Cc: Keir Fraser , Jan Beulich , "Nakajima, Jun" , Andrew Cooper , Aravind Gopalakrishnan , Suravee Suthikulpanit , Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org > From: Zhang, Haozhong > Sent: Monday, December 07, 2015 4:59 AM g and tscmode.txt > > Signed-off-by: Haozhong Zhang > --- > docs/man/xl.cfg.pod.5 | 15 ++++++++++++++- > docs/misc/tscmode.txt | 14 ++++++++++++++ > 2 files changed, 28 insertions(+), 1 deletion(-) > > diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 > index 2aca8dd..7e19a9b 100644 > --- a/docs/man/xl.cfg.pod.5 > +++ b/docs/man/xl.cfg.pod.5 > @@ -1313,9 +1313,18 @@ deprecated. Options are: > > =item B<"default"> > > -Guest rdtsc/p executed natively when monotonicity can be guaranteed > +Guest rdtsc/p is executed natively when monotonicity can be guaranteed > and emulated otherwise (with frequency scaled if necessary). > > +If a HVM container in B TSC mode is not migrated from other hosts "migrated from" -> "migrated to"? > +and the host TSC monotonicity can be guaranteed, the guest and host TSC > +frequencies will be the same. > + > +If a HVM container in B TSC mode is migrated to a host that can > +guarantee the TSC monotonicity and supports Intel VMX TSC scaling/AMD SVM and -> or? Do we think TSC scaling a must to ensure TSC monotonicity? It comes to the rescue only when host can't ensure monotonicity... > +TSC ratio, guest rdtsc/p will still execute natively after migration and the > +guest TSC frequencies before and after migration will be the same. will be the same before and after migration. > + > =item B<"always_emulate"> > > Guest rdtsc/p always emulated at 1GHz (kernel and user). Guest rdtsc/p > @@ -1337,6 +1346,10 @@ determine when a restore/migration has occurred and > assumes guest > obtains/uses pvclock-like mechanism to adjust for monotonicity and > frequency changes. > > +If a HVM container in B TSC mode can execute both guest > +rdtsc and guest rdtscp natively, then the guest TSC frequency will be > +determined in the similar way to that of B TSC mode. > + > =back > > Please see F for more information on this option. > diff --git a/docs/misc/tscmode.txt b/docs/misc/tscmode.txt > index e8c84e8..f3b70be 100644 > --- a/docs/misc/tscmode.txt > +++ b/docs/misc/tscmode.txt > @@ -297,3 +297,17 @@ and also much faster than nearly all OS-provided time > mechanisms. > While pvrtscp is too complex for most apps, certain enterprise > TSC-sensitive high-TSC-frequency apps may find it useful to > obtain a significant performance gain. > + > +Hardware TSC Scaling > + > +Intel VMX TSC scaling and AMD SVM TSC ratio allow the guest TSC read > +by guest rdtsc/p increasing in the different frequency than the host "in the different" -> "in a different" > +TSC frequency. > + > +For a HVM container is in default TSC mode (tsc_mode=0) or PVRDTSCP For a HVM container *which* is > +mode (tsc_mode=3) and can execute both guest rdtsc and rdtscp > +natively, if it is not migrated from other hosts, the guest and host > +TSC frequencies will be the same. "the guest and host TSC frequencies remain the same if the guest is not migrated to other host." and the condition is that the host supports constant TSC feature. > If it is migrated to a host > +supporting Intel VMX TSC scaling/AMD SVM TSC ratio and can still > +execute guest rdtsc and rdtscp natively, the guest TSC frequencies > +before and after migration will be the same. > -- > 2.6.3