Re: timecounter memory barriers

2018-09-18 Thread Mark Kettenis
> Date: Tue, 18 Sep 2018 17:59:21 +0200 > From: Alexander Bluhm > > Hi, > > In timecounter code, generation number and timehands are volatile, > but there are no memory barriers. In general such code is wrong > for SMP as it tells the compiler to care about ordering but ignores > cache reorderi

timecounter memory barriers

2018-09-18 Thread Alexander Bluhm
Hi, In timecounter code, generation number and timehands are volatile, but there are no memory barriers. In general such code is wrong for SMP as it tells the compiler to care about ordering but ignores cache reordering. NetBSD puts membar_producer() at places where I would put them. But in binu