> Date: Sun, 21 Jun 2020 16:55:56 +0100
> From: Stuart Henderson <s...@spacehopper.org>
> 
> On 2020/06/21 18:46, Paul Irofti wrote:
> > 
> > 
> > În 21 iunie 2020 16:30:43 EEST, Theo de Raadt <dera...@openbsd.org> a scris:
> > >Paul Irofti <p...@irofti.net> wrote:
> > >
> > >> If you change the name to rdtsc_ordered(), OK.
> > >
> > >That is a weaker name.
> > >
> > >Ordered in what way, at what level; ordered against what?
> > >
> > >This is using a specific pipeline ordering known as lfence.
> > >So it might as well say lfence.  That is the technical name for
> > >that type of ordering.  Being vague is unhelpful.
> > 
> > 
> > Ok then, if you think that's best.
> > 
> 
> Any idea why in
> https://www.intel.com/content/www/us/en/embedded/training/ia-32-ia-64-benchmark-code-execution-paper.html
> they are using cpuid to serialize access instead of lfence?

Yes; LFENCE only exists on machines with SSE2.  So if you want
something that works on older (32-bit) CPUs you need to use a
different instruction.  CPUID is the canonical choice for that.

Reply via email to