All of lore.kernel.org
 help / color / mirror / Atom feed
From: axboe@fb.com (Jens Axboe)
Subject: [PATCH v3 RESEND] nvme: avoid cqe corruption when update at the same time as read
Date: Tue, 22 Mar 2016 10:28:07 -0600	[thread overview]
Message-ID: <56F17297.50900@fb.com> (raw)
In-Reply-To: <927773622.9658030.1458658926133.JavaMail.zimbra@kalray.eu>

On 03/22/2016 09:02 AM, Marta Rybczynska wrote:
> Make sure the CQE phase (validity) is read before the rest of the
> structure. The phase bit is the highest address and the CQE
> read will happen on most platforms from lower to upper addresses
> and will be done by multiple non-atomic loads. If the structure
> is updated by PCI during the reads from the processor, the
> processor may get a corrupted copy.
>
> The addition of the new nvme_cqe_valid function that verifies
> the validity bit also allows refactoring of the other CQE read
> sequences.

Added for this merge window, thanks.

-- 
Jens Axboe

      parent reply	other threads:[~2016-03-22 16:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22 15:02 [PATCH v3 RESEND] nvme: avoid cqe corruption when update at the same time as read Marta Rybczynska
2016-03-22 15:04 ` Marta Rybczynska
2016-03-22 15:06 ` Keith Busch
2016-03-22 16:28 ` Jens Axboe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56F17297.50900@fb.com \
    --to=axboe@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.