Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Avoid thundering herd: cv_broadcast(&bp->b_busy) -> cv_s...
details: https://anonhg.NetBSD.org/src/rev/3b24381d447c
branches: trunk
changeset: 465995:3b24381d447c
user: ad <ad%NetBSD.org@localhost>
date: Sun Dec 08 19:23:51 2019 +0000
description:
Avoid thundering herd: cv_broadcast(&bp->b_busy) -> cv_signal(&bp->b_busy)
diffstat:
sys/dev/qbus/ts.c | 6 +++---
sys/kern/kern_physio.c | 6 +++---
sys/ufs/lfs/lfs_segment.c | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
diffs (81 lines):
diff -r 19f0052c5823 -r 3b24381d447c sys/dev/qbus/ts.c
--- a/sys/dev/qbus/ts.c Sun Dec 08 18:13:24 2019 +0000
+++ b/sys/dev/qbus/ts.c Sun Dec 08 19:23:51 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ts.c,v 1.31 2014/07/25 08:10:38 dholland Exp $ */
+/* $NetBSD: ts.c,v 1.32 2019/12/08 19:23:51 ad Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ts.c,v 1.31 2014/07/25 08:10:38 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ts.c,v 1.32 2019/12/08 19:23:51 ad Exp $");
#undef TSDEBUG
@@ -390,7 +390,7 @@
return;
biowait(bp);
mutex_enter(&bufcache_lock);
- cv_broadcast(&bp->b_busy);
+ cv_signal(&bp->b_busy);
bp->b_cflags = 0;
mutex_exit(&bufcache_lock);
}
diff -r 19f0052c5823 -r 3b24381d447c sys/kern/kern_physio.c
--- a/sys/kern/kern_physio.c Sun Dec 08 18:13:24 2019 +0000
+++ b/sys/kern/kern_physio.c Sun Dec 08 19:23:51 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_physio.c,v 1.95 2019/04/04 12:26:45 mlelstv Exp $ */
+/* $NetBSD: kern_physio.c,v 1.96 2019/12/08 19:23:51 ad Exp $ */
/*-
* Copyright (c) 1982, 1986, 1990, 1993
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_physio.c,v 1.95 2019/04/04 12:26:45 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_physio.c,v 1.96 2019/12/08 19:23:51 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -432,7 +432,7 @@
obp->b_cflags &= ~(BC_BUSY | BC_WANTED);
obp->b_flags &= ~(B_PHYS | B_RAW);
obp->b_iodone = NULL;
- cv_broadcast(&obp->b_busy);
+ cv_signal(&obp->b_busy);
mutex_exit(&bufcache_lock);
}
diff -r 19f0052c5823 -r 3b24381d447c sys/ufs/lfs/lfs_segment.c
--- a/sys/ufs/lfs/lfs_segment.c Sun Dec 08 18:13:24 2019 +0000
+++ b/sys/ufs/lfs/lfs_segment.c Sun Dec 08 19:23:51 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_segment.c,v 1.278 2018/09/03 16:29:37 riastradh Exp $ */
+/* $NetBSD: lfs_segment.c,v 1.279 2019/12/08 19:24:26 ad Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.278 2018/09/03 16:29:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.279 2019/12/08 19:24:26 ad Exp $");
#ifdef DEBUG
# define vndebug(vp, str) do { \
@@ -2197,7 +2197,7 @@
if (unbusybp != NULL) {
unbusybp->b_cflags &= ~BC_BUSY;
if (unbusybp->b_cflags & BC_WANTED)
- cv_broadcast(&bp->b_busy);
+ cv_signal(&bp->b_busy);
}
}
mutex_exit(&bufcache_lock);
Home |
Main Index |
Thread Index |
Old Index