Re: [PATCH v4 1/3] time: add "NOW() good" indicator
Jan Beulich <[email protected]>
| Newsgroups | org.xenproject.lists.xen-devel |
|---|---|
| Message-ID | <[email protected]> |
On 28.07.2026 10:17, Roger Pau Monné wrote: > On Tue, Jun 30, 2026 at 04:06:00PM +0200, Jan Beulich wrote: >> --- a/xen/arch/x86/time.c >> +++ b/xen/arch/x86/time.c >> @@ -2660,6 +2660,7 @@ void __init early_time_init(void) >> >> set_time_scale(&t->tsc_scale, tmp); >> t->stamp.local_tsc = boot_tsc_stamp; >> + NOW_good = true; > > Would you need a barrier here to ensure compiler doesn't re-order the > writes? Maybe using ACCESS_ONCE(), or a smp_wmb() like it's used in > other arches? Aiui it isn't needed here. The compiler can't re-order the two writes, due to our use of -fno-strict-aliasing. The barrier is there on other arch-es to avoid re-ordering in hardware. Jan