Re: [PATCH 3/3 V2] pvclock: Get rid of __pvclock_read_cycles in function pvclock_read_flags

From: Borislav Petkov
Date: Thu Jun 09 2016 - 07:28:17 EST


On Thu, Jun 09, 2016 at 01:21:18PM +0200, Paolo Bonzini wrote:
> This is basically implementing a seqcount. It needs two barriers and,

Why does it need the two barriers? More details please.

> technically, they should be virt_rmb() -- it really doesn't matter of
> course because reads are never reordered on x86.

You mean

version = src->version;
flags = src->flags;

are not reordered?

I don't think so.

--
Regards/Gruss,
Boris.

SUSE Linux GmbH, GF: Felix ImendÃrffer, Jane Smithard, Graham Norton, HRB 21284 (AG NÃrnberg)
--