From 8f25c57f5c43023e6ecba0d0e0d50c014b2d2713 Mon Sep 17 00:00:00 2001 From: bluhm Date: Mon, 3 Oct 2022 14:10:53 +0000 Subject: [PATCH] Add a second membar producer into counters_zero(). Now it is symmetric to counters_read(). OK jmatthew@ --- sys/kern/subr_percpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_percpu.c b/sys/kern/subr_percpu.c index ef46eae29a0..4cc66d0b81e 100644 --- a/sys/kern/subr_percpu.c +++ b/sys/kern/subr_percpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_percpu.c,v 1.9 2021/03/10 10:21:47 jsg Exp $ */ +/* $OpenBSD: subr_percpu.c,v 1.10 2022/10/03 14:10:53 bluhm Exp $ */ /* * Copyright (c) 2016 David Gwynne @@ -213,6 +213,7 @@ counters_zero(struct cpumem *cm, unsigned int n) unsigned int i; counters = cpumem_first(&cmi, cm); + membar_producer(); do { for (i = 0; i < n; i++) counters[i] = 0; -- 2.20.1