From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH] svm: Do not intercept RDTCS(P) when TSC scaling is supported by hardware Date: Wed, 25 Apr 2012 16:07:53 -0400 Message-ID: <4F985999.6030401@amd.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Keir Fraser Cc: Dan Magenheimer , wei.huang2@amd.com, Jan Beulich , xen-devel List-Id: xen-devel@lists.xenproject.org On 04/25/2012 01:14 PM, Keir Fraser wrote: > On 25/04/2012 17:04, "Wei Huang" wrote: > >>> I certainly don't feel comfortable ACKing it. I'd like >>> to see some testing that demonstrates the patch either improves >>> functionality or performance without breaking other things. >>> But if nobody else shares my concern, I don't feel that >>> I have the right to block it either. >> >> We can provide some rdtsc performance numbers. Regarding functionality, >> it is relatively hard to prove unless Dan has some more specific ideas >> of testing it. I think the hardware rdtsc scaling is inline with >> software-based emulated approach. > > I've put it in to xen-unstable. I'm not sure about putting into 4.1 for the > forthcoming release from that branch. As far as performance numbers are concerned, with this patch applied (i.e. native execution) RDTSC instruction executed in a loop takes about 150ns per iteration. That's including a few instructions for loop control. With full SW emulation (pre-patch) the same loop is executed in roughly 6us. Obviously this is not a realistic scenario but it gives a feel of what the patch provides. -boris