From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [Xen-users] Re: Xen 4 TSC problems Date: Wed, 17 Oct 2012 17:15:40 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="B_3433338947_42397714" 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: Mauro , Jan Beulich Cc: Jeremy Fitzhardinge , xen-devel@lists.xensource.com, Dan Magenheimer , Olivier Hanesse , Xen Users , Mark Adams 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_3433338947_42397714 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit On 15/10/2012 15:25, "Mauro" wrote: > On 15 October 2012 14:49, Jan Beulich wrote: >>>>> On 15.10.12 at 13:24, Mauro wrote: >>> I have the problem on this hardware type: >>> >>> Hp Proliant DL580 G5 with four Intel(R) Xeon(R) CPU E7330 @ 2.40GHz. >>> It seem that >>> GRUB_CMDLINE_XEN="clocksource=pit cpuidle=0" >>> put in in /etc/default/grup (I use linux debian) >>> solves the problem for me. >> >> Did you check whether either or both options on their own also >> make the problem go away? > > Only clocksource=pit does not solve the problem, I've not tried with > only cpuidle=0, I will try soon. The problem here is that the platform timer has *not* wrapped. In fact it is almost certainly correct, and it is the calculation of current-system-time extrapolated from local CPU's TSC that has gone haywire. The overflow-handling logic in plt_overflow() then propagates that incorrectness into plt_stamp64 (up to a maximum of 10 times wrapping the platform timer's counter). This means that platform time is incorrect (skips forward) and soon after will infect the local time estimation for all CPUs. I've attached a patch which will (a) stop plt_overflow() from misguidedly trying to fix up apparent platform timer overflow; and (b) will print possibly-useful diagnostics when apparent 'timer overflow' occurs. Such lines will be prefixed "XXX plt_overflow:" in the hypervisor log. Patch is against xen-unstable but I'm sure it must backport to older trees quite trivially. -- Keir --B_3433338947_42397714 Content-type: application/octet-stream; name="00-tsc-debug" Content-disposition: attachment; filename="00-tsc-debug" Content-transfer-encoding: base64 ZGlmZiAtciBjMWM1NDljNGZlOWUgeGVuL2FyY2gveDg2L3RpbWUuYwotLS0gYS94ZW4vYXJj aC94ODYvdGltZS5jCU1vbiBPY3QgMTUgMTY6NTE6NDQgMjAxMiArMDEwMAorKysgYi94ZW4v YXJjaC94ODYvdGltZS5jCVdlZCBPY3QgMTcgMTc6MTM6MjIgMjAxMiArMDEwMApAQCAtNTIz LDExICs1MjMsMTIgQEAgc3RhdGljIHNfdGltZV90IF9fcmVhZF9wbGF0Zm9ybV9zdGltZSh1 Ngogc3RhdGljIHZvaWQgcGx0X292ZXJmbG93KHZvaWQgKnVudXNlZCkKIHsKICAgICBpbnQg aTsKLSAgICB1NjQgY291bnQ7CisgICAgdTY0IGNvdW50LCBvbGRfc3RhbXAsIHRzYzsKICAg ICBzX3RpbWVfdCBub3csIHBsdF9ub3csIHBsdF93cmFwOwogCiAgICAgc3Bpbl9sb2NrX2ly cSgmcGxhdGZvcm1fdGltZXJfbG9jayk7CiAKKyAgICBvbGRfc3RhbXAgPSBwbHRfc3RhbXA7 CiAgICAgY291bnQgPSBwbHRfc3JjLnJlYWRfY291bnRlcigpOwogICAgIHBsdF9zdGFtcDY0 ICs9IChjb3VudCAtIHBsdF9zdGFtcCkgJiBwbHRfbWFzazsKICAgICBwbHRfc3RhbXAgPSBj b3VudDsKQEAgLTU0MCw2ICs1NDEsMTQgQEAgc3RhdGljIHZvaWQgcGx0X292ZXJmbG93KHZv aWQgKnVudXNlZCkKICAgICAgICAgcGx0X3dyYXAgPSBfX3JlYWRfcGxhdGZvcm1fc3RpbWUo cGx0X3N0YW1wNjQgKyBwbHRfbWFzayArIDEpOwogICAgICAgICBpZiAoIEFCUyhwbHRfd3Jh cCAtIG5vdykgPiBBQlMocGx0X25vdyAtIG5vdykgKQogICAgICAgICAgICAgYnJlYWs7Cisg ICAgICAgIHJkdHNjbGwodHNjKTsKKyAgICAgICAgcHJpbnRrKCJYWFggcGx0X292ZXJmbG93 OiBwbHRfbm93PSUiUFJJeDY0IiBwbHRfd3JhcD0lIlBSSXg2NAorICAgICAgICAgICAgICAg IiBub3c9JSJQUkl4NjQiIG9sZF9zdGFtcD0lIlBSSXg2NCIgbmV3X3N0YW1wPSUiUFJJeDY0 CisgICAgICAgICAgICAgICAiIHBsdF9zdGFtcDY0PSUiUFJJeDY0IiBwbHRfbWFzaz0lIlBS SXg2NAorICAgICAgICAgICAgICAgIiB0c2M9JSJQUkl4NjQiIHRzY19zdGFtcD0lIlBSSXg2 NCJcbiIsCisgICAgICAgICAgICAgICBwbHRfbm93LCBwbHRfd3JhcCwgbm93LCBvbGRfc3Rh bXAsIHBsdF9zdGFtcCwgcGx0X3N0YW1wNjQsCisgICAgICAgICAgICAgICBwbHRfbWFzaywg dHNjLCB0aGlzX2NwdShjcHVfdGltZSkubG9jYWxfdHNjX3N0YW1wKTsKKyAgICAgICAgYnJl YWs7CiAgICAgICAgIHBsdF9zdGFtcDY0ICs9IHBsdF9tYXNrICsgMTsKICAgICB9CiAgICAg aWYgKCBpICE9IDAgKQo= --B_3433338947_42397714 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_3433338947_42397714--