lkml.org 
[lkml]   [2015]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] blktrace: re-write setting q->blk_trace
Date
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


\
 
 \ /
  Last update: 2015-10-28 23:01    [W:0.059 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site