[PATCH] nvmet: protect sqhd update by a lock

Johannes Thumshirn jthumshirn at suse.de
Mon Oct 16 08:00:39 PDT 2017


On Mon, Oct 16, 2017 at 07:57:31AM -0700, James Smart wrote:
> The real issue, where memory barrier isn't enough, is between the value of
> the sqhd increment followed by the modulo. Many of a time I've seen
> interruption in between these points.
> 
> As far as assignment of the cqe - as long a sqhd is getting updated
> properly, such that the cqe will return either the value just set  or a
> newer one, even if another cqe returns the same newer value, it's fine per
> the sqhd definition in nvme.
> 
> As it's no big deal - I'll repost with the lock moved

OK, thanks.

-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850



More information about the Linux-nvme mailing list