Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1258444

Re: [PATCH v2] blktrace: re-write setting q->blk_trace

From Jeff Moyer <jmoyer@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] blktrace: re-write setting q->blk_trace
Date 2015-10-28 22:40 +0100
Message-ID <qoGBP-84j-5@gated-at.bofh.it> (permalink)
References <qo2O5-8hu-1@gated-at.bofh.it> <qo2XL-8qJ-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] blktrace: re-write setting q->blk_trace Davidlohr Bueso <dave@stgolabs.net> - 2015-10-27 04:10 +0100
  [PATCH v2] blktrace: re-write setting q->blk_trace Davidlohr Bueso <dave@stgolabs.net> - 2015-10-27 04:20 +0100
    Re: [PATCH v2] blktrace: re-write setting q->blk_trace Jeff Moyer <jmoyer@redhat.com> - 2015-10-28 22:40 +0100
      Re: [PATCH v2] blktrace: re-write setting q->blk_trace Davidlohr Bueso <dave@stgolabs.net> - 2015-10-29 20:20 +0100
        Re: [PATCH v2] blktrace: re-write setting q->blk_trace Jeff Moyer <jmoyer@redhat.com> - 2015-10-29 20:40 +0100
        Re: [PATCH v2] blktrace: re-write setting q->blk_trace Jens Axboe <axboe@kernel.dk> - 2015-10-29 21:30 +0100
          Re: [PATCH v2] blktrace: re-write setting q->blk_trace Jens Axboe <axboe@kernel.dk> - 2015-10-29 21:50 +0100
            Re: [PATCH v2] blktrace: re-write setting q->blk_trace Jeff Moyer <jmoyer@redhat.com> - 2015-10-29 22:00 +0100
          Re: [PATCH v2] blktrace: re-write setting q->blk_trace Jeff Moyer <jmoyer@redhat.com> - 2015-10-29 21:50 +0100
          Re: [PATCH v2] blktrace: re-write setting q->blk_trace Davidlohr Bueso <dave@stgolabs.net> - 2015-10-29 22:10 +0100

csiph-web