public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel•org>
To: Gui-Dong Han <hanguidong02@gmail•com>
Cc: sven@kernel•org, linux-nvme@lists•infradead.org, axboe@kernel•dk,
	hch@lst•de, sagi@grimberg•me, j@jannau•net, neal@gompa•dev,
	asahi@lists•linux.dev, linux-kernel@vger•kernel.org,
	linux-arm-kernel@lists•infradead.org, baijiaju1990@gmail•com
Subject: Re: [PATCH] nvme-apple: Use acquire/release for queue enabled state
Date: Wed, 3 Jun 2026 10:54:02 +0100	[thread overview]
Message-ID: <ah_5utfy2oJbUCw7@kbusch-mbp> (raw)
In-Reply-To: <20260603072205.3291888-1-hanguidong02@gmail.com>

On Wed, Jun 03, 2026 at 03:22:05PM +0800, Gui-Dong Han wrote:
> apple_nvme_init_queue() initializes queue state and then marks the queue
> enabled. The interrupt and request paths check enabled before using that
> queue state.
> 
> The existing wmb() after WRITE_ONCE(enabled, true) orders the enabled
> store before later queue use, but it does not publish the earlier
> initialization before enabled becomes visible.
> 
> Use a release store when enabling the queue and acquire loads when
> testing it. Keep the existing wmb() in place for the
> store-before-later-use ordering.

Doesn't smp_store_release() already get you those semantics?

Also, there are a few other places doing the READ/WRITE_ONCE() calls in
apple_nvme_disable. Do you want to update those too for consistency?


  reply	other threads:[~2026-06-03  9:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03  7:22 [PATCH] nvme-apple: Use acquire/release for queue enabled state Gui-Dong Han
2026-06-03  9:54 ` Keith Busch [this message]
2026-06-03 11:45   ` Gui-Dong Han

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=ah_5utfy2oJbUCw7@kbusch-mbp \
    --to=kbusch@kernel$(echo .)org \
    --cc=asahi@lists$(echo .)linux.dev \
    --cc=axboe@kernel$(echo .)dk \
    --cc=baijiaju1990@gmail$(echo .)com \
    --cc=hanguidong02@gmail$(echo .)com \
    --cc=hch@lst$(echo .)de \
    --cc=j@jannau$(echo .)net \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-nvme@lists$(echo .)infradead.org \
    --cc=neal@gompa$(echo .)dev \
    --cc=sagi@grimberg$(echo .)me \
    --cc=sven@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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