[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] x86/time: make do_settime() uses more accurate


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 7 May 2026 12:26:51 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=B/NAGs1SFXoq2ei+2M2RXSRYdHni8CX284p5v+iFM1k=; b=myCXqdt6BEc20s5dsIo1xxQjLK199gzlkvAQoMecSUF2TRINw/m57RNgIgoadt0TepdmJNhcaZB1hiKttl1HUCYp6IidWaytbw0yiGD14NqImdgz1okJ1rordA6mRUG815bGhQIKAUEmMZiHm2tExcbFd8nnj93rdQaNbeRUGHIDyrSHLNXvAkAM6yyIldjAeHpBWLO00+ZNI5hETVOWL5RZSA1LXXqWvmGweVZDbYN7g2ZkRe3rSEBY+JVoiZYqgvndIt0g1MvHJng1qh7ipHZRBywD43g/to1ReRqvJVhdsEVENVXMcB9FlvQ1J+B3MDd+wZfYeBoWFtav8YNfoQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DnYf55TyDG9F0Uevte+KGwKypZgjZpV+hAVM3YjP32C/KgZxRuh9eW/JXwHuF7eMpS6UdyAQpCnciSjyKiyXAYvYJjTftjku1UGbVQjfHKu5I5CvuNTtk+46ieFFykfe5tPSbzexNQORqC0GA0lxV1tJtUKv/Fbe/uS6ZL3ZMjrWcL7hgMgUgAwXSFdwNldqOLTyYUF4xhFoCinsnmm3pAXzI7SAxFGQGeR0ajf7fwF1pBShWa1LwTTXTTJRNq3kQSVKFsciAmUc5zgHZ1nChK9YZbSnrTVIo8TCrm37CNBQPPu5Isoxi7e+qQCuyKcnj+GCkflKKPEwwcOk4qIbhA==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • Delivery-date: Thu, 07 May 2026 10:27:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, May 06, 2026 at 11:35:45AM +0200, Jan Beulich wrote:
> As a comment next to one of the invocations states, get_wallclock_time()
> can take over a second. The order of evaluation of function arguments is
> in principle unspecified; in practice at least gcc looks to be evaluating
> them from last to first. Hence with NOW() invoked first, the respective
> value passed to do_settime() can be off by over a second (which is in
> contrast to __get_cmos_time() attempting to get the time exactly after an
> update, i.e. [pretty] precisely at a seconds boundary).
> 
> This also addresses a Misra C:2012 rule 13.2 ("The value of an expression
> and its persistent side-effects shall be the same under all permitted
> evaluation orders") violation each.
> 
> Fixes: f64134cdb81c ("x86: Fix time_resume() to notify all domains of 
> wallclock change")
> Fixes: 0bfcf984b727 ("x86: Reintroduce clocksource=tsc")
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.