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

2015-10-26 Thread Davidlohr Bueso
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(>blk_trace, bt);

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

2015-10-26 Thread Davidlohr Bueso
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(>blk_trace, bt);