From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Mammedov Subject: Re: [PATCH RFC] pvclock: Make pv_clock more robust and fixup it if overflow happens Date: Mon, 13 Feb 2012 19:15:07 +0100 Message-ID: <4F39532B.3060203@redhat.com> References: <20120213130727.GA8052@amt.cnet> <1329147959-22472-1-git-send-email-imammedo@redhat.com> <20120213174837.GA11513@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, jacob.jun.pan@linux.intel.com, alan@linux.intel.com, feng.tang@intel.com, konrad.wilk@oracle.com, avi@redhat.com, glommer@redhat.com, johnstul@us.ibm.com, riel@redhat.com, tj@kernel.org, kosaki.motohiro@jp.fujitsu.com, akpm@linux-foundation.org, amit.shah@redhat.com To: Marcelo Tosatti Return-path: In-Reply-To: <20120213174837.GA11513@amt.cnet> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 02/13/2012 06:48 PM, Marcelo Tosatti wrote: > On Mon, Feb 13, 2012 at 04:45:59PM +0100, Igor Mammedov wrote: >> Instead of hunting misterious stalls/hungs all over the kernel when >> overflow occurs at pvclock.c:pvclock_get_nsec_offset >> >> u64 delta = native_read_tsc() - shadow->tsc_timestamp; >> >> and introducing hooks when places of unexpected access found, pv_clock >> should be initialized for the calling cpu if overflow condition is detected. >> >> Signed-off-by: Igor Mammedov > > Igor, > > I disagree. This is fixing the symptom not the root cause. Additionally, > Xen also uses pvclock_clocksource_read. > > How about adding a BUG_ON to detect the overflow, this way hunting for > the problem is not necessary. > Ok, I'll repost bug_on version.