From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: lock in vhpet Date: Thu, 19 Apr 2012 09:47:27 +0100 Message-ID: References: <20120419082717.GA23663@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="B_3417673660_5389804" Return-path: In-Reply-To: <20120419082717.GA23663@ocelot.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan , "Zhang, Yang Z" Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3417673660_5389804 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit On 19/04/2012 09:27, "Tim Deegan" wrote: > At 05:19 +0000 on 19 Apr (1334812779), Zhang, Yang Z wrote: >> There have no problem with this patch, it works well. But it cannot >> fix the win8 issue. It seems there has some other issues with hpet. I >> will look into it. Thanks for your quick patch. > > The lock in hvm_get_guest_time() will still be serializing the hpet > reads. But since it needs to update a shared variable, that will need to > haul cachelines around anyway. Yes, that's true. You could try the attached hacky patch out of interest, to see what that lock is costing you in your scenario. But if we want consistent monotonically-increasing guest time, I suspect we can't get rid of the lock, so that's going to limit our scalability unavoidably. Shame. -- Keir > Tim. > --B_3417673660_5389804 Content-type: application/octet-stream; name="00-lockfree-hvm-time" Content-disposition: attachment; filename="00-lockfree-hvm-time" Content-transfer-encoding: base64 ZGlmZiAtciA3Yzc3N2NiOGY3MDUgeGVuL2FyY2gveDg2L2h2bS92cHQuYwotLS0gYS94ZW4v YXJjaC94ODYvaHZtL3ZwdC5jCVdlZCBBcHIgMTggMTY6NDk6NTUgMjAxMiArMDEwMAorKysg Yi94ZW4vYXJjaC94ODYvaHZtL3ZwdC5jCVRodSBBcHIgMTkgMDk6NDU6NDMgMjAxMiArMDEw MApAQCAtNDMsMTQgKzQzLDcgQEAgdTY0IGh2bV9nZXRfZ3Vlc3RfdGltZShzdHJ1Y3QgdmNw dSAqdikKICAgICAvKiBDYWxsZWQgZnJvbSBkZXZpY2UgbW9kZWxzIHNoYXJlZCB3aXRoIFBW IGd1ZXN0cy4gQmUgY2FyZWZ1bC4gKi8KICAgICBBU1NFUlQoaXNfaHZtX3ZjcHUodikpOwog Ci0gICAgc3Bpbl9sb2NrKCZwbC0+cGxfdGltZV9sb2NrKTsKICAgICBub3cgPSBnZXRfc190 aW1lKCkgKyBwbC0+c3RpbWVfb2Zmc2V0OwotICAgIGlmICggKGludDY0X3QpKG5vdyAtIHBs LT5sYXN0X2d1ZXN0X3RpbWUpID4gMCApCi0gICAgICAgIHBsLT5sYXN0X2d1ZXN0X3RpbWUg PSBub3c7Ci0gICAgZWxzZQotICAgICAgICBub3cgPSArK3BsLT5sYXN0X2d1ZXN0X3RpbWU7 Ci0gICAgc3Bpbl91bmxvY2soJnBsLT5wbF90aW1lX2xvY2spOwotCiAgICAgcmV0dXJuIG5v dyArIHYtPmFyY2guaHZtX3ZjcHUuc3RpbWVfb2Zmc2V0OwogfQogCg== --B_3417673660_5389804 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --B_3417673660_5389804--