Module Name:    src
Committed By:   riastradh
Date:           Wed Feb 22 21:44:45 UTC 2023

Modified Files:
        src/sys/rump/librump/rumpkern: lwproc.c

Log Message:
rump: Nix membar_enter/exit after/before RUMPUSER_LWP_CREATE/DESTROY.

These make no sense and are obviously not needed for any of the
rumpuser implementations in-tree.  (For single-threaded fiber and
pth_dummy, no barriers needed; for pth, RUMPUSER_LWP_CREATE/DESTROY
use pthread_mutex so don't need any barriers.)

It _might_ make sense to do membar_release/acquire around just
RUMPUSER_LWP_DESTROY, perhaps if there's some reference-counting
business involved.  But if a rumpuser implementation really needs
that it can do it itself.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/rump/librump/rumpkern/lwproc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/lwproc.c
diff -u src/sys/rump/librump/rumpkern/lwproc.c:1.53 src/sys/rump/librump/rumpkern/lwproc.c:1.54
--- src/sys/rump/librump/rumpkern/lwproc.c:1.53	Wed Feb 22 21:44:33 2023
+++ src/sys/rump/librump/rumpkern/lwproc.c	Wed Feb 22 21:44:45 2023
@@ -1,4 +1,4 @@
-/*      $NetBSD: lwproc.c,v 1.53 2023/02/22 21:44:33 riastradh Exp $	*/
+/*      $NetBSD: lwproc.c,v 1.54 2023/02/22 21:44:45 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #define RUMP__CURLWP_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.53 2023/02/22 21:44:33 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.54 2023/02/22 21:44:45 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -334,7 +334,6 @@ lwproc_freelwp(struct lwp *l)
 	lwp_finispecific(l);
 
 	lwproc_curlwpop(RUMPUSER_LWP_DESTROY, l);
-	membar_exit();
 	kmem_free(l, sizeof(*l));
 
 	if (p->p_stat == SDEAD)
@@ -379,7 +378,6 @@ lwproc_makelwp(struct proc *p, bool dosw
 	lwp_initspecific(l);
 	PSREF_DEBUG_INIT_LWP(l);
 
-	membar_enter();
 	lwproc_curlwpop(RUMPUSER_LWP_CREATE, l);
 	if (doswitch) {
 		rump_lwproc_switch(l);

Reply via email to