From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Dan Magenheimer" Subject: RE: RE: [PATCH] rendezvous-based local time calibration WOW! Date: Wed, 6 Aug 2008 09:34:28 -0600 Message-ID: <20080806093428671.00000008444@djm-pc> References: <20080806152147.GD1789@totally.trollied.org.uk> Reply-To: "dan.magenheimer@oracle.com" Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20080806152147.GD1789@totally.trollied.org.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: John Levon Cc: Ian Pratt , "Xen-Devel (E-mail)" , Dave Winchell , Keir Fraser List-Id: xen-devel@lists.xenproject.org > > The overhead of measuring the inter-CPU stime skew is > > too large to do at every cross-PCPU-schedule so doing > > any kind of adjustment would be difficult. > > But it might make sense for the Xen scheduler to do a > > get_s_time() before and after a cross-PCPU-schedule > > to detect the problem and printk if it occurs > > (possibly rate-limited in case it happens a lot on > > some badly-behaved machine). > = > If we're doing a get_s_time() before the schedule, don't we = > merely* have > to ensure that the new s_time is after the last recorded one on the > previous CPU? (Yes, I'm handwaving terribly) Yes, that detects the problem so it can be printk'd. But what can be done to reliably adjust for it? Adding a fixed offset to the new cpu's stime doesn't work because stime computation is adapted independently and dynamically on each cpu, so inter-CPU skew "jitters" and adding a constant may just make the max skew worse. I'm not saying it can't be done, but I'm pretty sure it will be messy, so let's make sure it needs to be fixed before trying to fix it.