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

Re: [PATCH] x86/time: make early NOW() uses slightly more precise


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 6 May 2026 12:19:57 +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=bomuz7Ql487bedmZHLAWUDdodoQqu6QO9+uxzpPiEkA=; b=OYku3PiJVfz4F/ETXm5ibIVomM+sPeRPJRePCkEqlW2CIYcLxpEtao9+DKNyUhTqVKJ4MCBcsvkVz+bAbTNDbRkPvA8zSJ7uWZ+ODceLykQM1CcpWXG9WXt9eho7dHlDTLmXSikYjQcw0xgLjMguJ6OJ+tGEgFDrs0iD9HvnblJ8RW0nGa9H3VC7HZwkWKCzl/x0+hx8EOPGteXyqELWyCmnY40kJL1Oxrh5URtaFnsEfUpmT1IiGIxvCUZZ7b6I03WZn1eBGrU4iLuEiLis/WAej3TRQGFgUBkwpXEfJ96jBREK1k/TQnJ4utlmeqRFQWR00ZTYPkEFtuFfljkjcw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hlIiS/NQf0C8FsA7reIX9p8SMakBsIs0mV7wHjn9l5EGY0f4VKiAwrlKfzcE03frgQUqzuaKC29zqiDSTyIX19MJGmXReUiJ95Q6HZIkiD8DgFBFZOaPJb0xT2IQSw1zdSJ4NJdV8pWmeynH7etjQYiBD/JPDB/CYk5dosNTD7Br5Qzin8rY+rAZadrzi9bNh650icpi56bylHp3mQij9abwqYRYgEcRP9YVQL8xCdkwsPmF18dof9eiDqA0Dale17zIDtEiIhRGz923oMTPDRyOgoIIzrVwhQ4rfM69toRP7WAMAPsqkXMZkMM/AuwMYSvrDaMtEmfjCBDHoHsEZQ==
  • 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>
  • Delivery-date: Wed, 06 May 2026 10:20:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, May 06, 2026 at 11:33:55AM +0200, Jan Beulich wrote:
> For early NOW() uses to yield sufficiently precise results (scaling incurs
> some error, which grows with the delta being scaled), init_percpu_time()
> wants to have run as early as possible. With 93340297802b ("x86/time:
> calibrate TSC against platform timer") having moved the invocation of
> init_platform_timer() from init_xen_time() to early_time_init(), this
> other call could be moved as well.
> 
> Moving, however, has the unwanted effect of then growing the gap until
> time calibration runs for the 1st time. Therefore keep the present
> invocation, and add another from early_time_init().

Yeah, keeping the second init_xen_time() will make sure the BSP
doesn't diverge too much from the platform timer during boot.  WE
migth as well skip it and wait for the first rendezvous, but this is
likely more accurate at the cost of doing the extra init_xen_time() in
the BSP.

> 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®.