Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/xen/xen xencons(4): Reduce unnecessary membars.
details: https://anonhg.NetBSD.org/src/rev/c079ec2a886f
branches: trunk
changeset: 373716:c079ec2a886f
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Feb 25 00:33:38 2023 +0000
description:
xencons(4): Reduce unnecessary membars.
- xencons_handler: After advancing in_cons, only need one xen_wmb
before notifying the hypervisor that we're ready for more.
(XXX Should this do xen_mb and re-check in_prod at that point, or
does hypervisor_notify_via_evtchn obviate the need for this?)
- xenvonscn_getc: After reading in_prod, only need one xen_rmb before
using the slots it is telling us are now ready.
diffstat:
sys/arch/xen/xen/xencons.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r 7b2910c01803 -r c079ec2a886f sys/arch/xen/xen/xencons.c
--- a/sys/arch/xen/xen/xencons.c Sat Feb 25 00:33:27 2023 +0000
+++ b/sys/arch/xen/xen/xencons.c Sat Feb 25 00:33:38 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xencons.c,v 1.51 2023/02/25 00:33:27 riastradh Exp $ */
+/* $NetBSD: xencons.c,v 1.52 2023/02/25 00:33:38 riastradh Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -53,7 +53,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xencons.c,v 1.51 2023/02/25 00:33:27 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xencons.c,v 1.52 2023/02/25 00:33:38 riastradh Exp $");
#include "opt_xen.h"
@@ -479,9 +479,9 @@
cons += len;
xen_wmb();
xencons_interface->in_cons = cons;
- xen_wmb();
}
}
+ xen_wmb();
hypervisor_notify_via_evtchn(xen_start_info.console.domU.evtchn);
splx(s);
return 1;
@@ -575,7 +575,6 @@
cons = xencons_interface->in_cons;
prod = xencons_interface->in_prod;
- xen_rmb();
while (cons == prod) {
HYPERVISOR_yield();
prod = xencons_interface->in_prod;
Home |
Main Index |
Thread Index |
Old Index