From: jsmart2021@gmail.com (James Smart)
Subject: [PATCH v2] nvmet: protect sqhd update by a lock
Date: Wed, 18 Oct 2017 09:45:42 -0700 [thread overview]
Message-ID: <3ac0e8f3-69f1-e147-6221-809d68cb1ccf@gmail.com> (raw)
In-Reply-To: <20171018072343.GA13666@infradead.org>
On 10/18/2017 12:23 AM, Christoph Hellwig wrote:
> do {
> old_sqhd = req->sq->sqhd;
> new_sqhd = (old + 1) % req->sq->size;
> } while (cmpxchg(&req->sq->sqhd, old_sqhd, new_sqhd) != old_sqhd);
sweet. does look good.
I'll repost as v3, but with an ammended title
-- james
prev parent reply other threads:[~2017-10-18 16:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-16 15:18 [PATCH v2] nvmet: protect sqhd update by a lock James Smart
2017-10-16 15:31 ` Johannes Thumshirn
2017-10-17 6:43 ` Christoph Hellwig
2017-10-17 14:19 ` James Smart
2017-10-18 7:23 ` Christoph Hellwig
2017-10-18 16:45 ` James Smart [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=3ac0e8f3-69f1-e147-6221-809d68cb1ccf@gmail.com \
--to=jsmart2021@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).