Commit 41100833 authored by Leo Yan's avatar Leo Yan Committed by Peter Zijlstra
Browse files

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: default avatarLeo Yan <leo.yan@linaro.org>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210809111407.596077-5-leo.yan@linaro.org
parent 4034fb20
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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