diff options
author | Leo Yan <[email protected]> | 2021-08-09 19:14:02 +0800 |
---|---|---|
committer | Peter Zijlstra <[email protected]> | 2021-09-17 15:08:38 +0200 |
commit | 41100833cdd8b1bef363b81a6482d74711c116ad (patch) | |
tree | 9893aeb221c1e071aa92f9ca582b468f69068e98 | |
parent | 4034fb207e302cc0b1f304084d379640c1fb1436 (diff) |
perf/x86: Add compiler barrier after updating BTS
Since BTS is coherent, simply add a compiler barrier to separate the BTS
update and aux_head store.
Signed-off-by: Leo Yan <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
-rw-r--r-- | arch/x86/events/intel/bts.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/events/intel/bts.c b/arch/x86/events/intel/bts.c index 6320d2cfd9d3..974e917e65b2 100644 --- a/arch/x86/events/intel/bts.c +++ b/arch/x86/events/intel/bts.c @@ -209,6 +209,12 @@ static void bts_update(struct bts_ctx *bts) } else { local_set(&buf->data_size, head); } + + /* + * Since BTS is coherent, just add compiler barrier to ensure + * BTS updating is ordered against bts::handle::event. + */ + barrier(); } static int |