From: Jeff Moyer <jmoyer@redhat.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: Jens Axboe <axboe@kernel.dk>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] blktrace: re-write setting q->blk_trace
Date: Wed, 28 Oct 2015 17:37:41 -0400 [thread overview]
Message-ID: <x49twpallne.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <20151027031452.GI27292@linux-uzut.site> (Davidlohr Bueso's message of "Mon, 26 Oct 2015 20:14:52 -0700")
Davidlohr Bueso <dave@stgolabs.net> writes:
> This is really about simplifying the double xchg patterns into
> a single cmpxchg, with the same logic. Other than the immediate
> cleanup, there are some subtleties this change deals with:
>
> (i) While the load of the old bt is fully ordered wrt everything,
> ie:
>
> old_bt = xchg(&q->blk_trace, bt); [barrier]
> if (old_bt)
> (void) xchg(&q->blk_trace, old_bt); [barrier]
>
> blk_trace could still be changed between the xchg and the old_bt
> load. Note that this description is merely theoretical and afaict
> very small, but doing everything in a single context with cmpxchg
> closes this potential race.
>
> (ii) Ordering guarantees are obviously kept with cmpxchg.
Hi David,
The patch itself looks ok, but it doesn't seem to apply to a recent
kernel tree. It appears as though it is white-space damaged. Would you
mind re-sending it?
Thanks!
Jeff
next prev parent reply other threads:[~2015-10-28 21:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 3:05 [PATCH] blktrace: re-write setting q->blk_trace Davidlohr Bueso
2015-10-27 3:14 ` [PATCH v2] " Davidlohr Bueso
2015-10-28 21:37 ` Jeff Moyer [this message]
2015-10-29 19:19 ` Davidlohr Bueso
2015-10-29 19:35 ` Jeff Moyer
2015-10-29 20:28 ` Jens Axboe
2015-10-29 20:46 ` Jeff Moyer
2015-10-29 20:48 ` Jens Axboe
2015-10-29 20:52 ` Jeff Moyer
2015-10-29 21:05 ` Davidlohr Bueso
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=x49twpallne.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer@redhat.com \
--cc=axboe@kernel.dk \
--cc=dave@stgolabs.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
/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).