git: 50176b0296f0 - main - locks: whack a failed experiment in form of restrict_starvation
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 16 Sep 2022 17:29:59 UTC
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=50176b0296f0f143f1ac655c8e50ab340f36536a commit 50176b0296f0f143f1ac655c8e50ab340f36536a Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2022-09-16 17:28:35 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2022-09-16 17:29:37 +0000 locks: whack a failed experiment in form of restrict_starvation This was never enabled and only pollutes the code. The issue will be addressed later in a different manner. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/kern/subr_lock.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/sys/kern/subr_lock.c b/sys/kern/subr_lock.c index 9bea021baac4..1061ed5f5d03 100644 --- a/sys/kern/subr_lock.c +++ b/sys/kern/subr_lock.c @@ -64,9 +64,6 @@ __FBSDID("$FreeBSD$"); */ //#define LOCK_PROFILING_DEBUG_SPIN -SDT_PROVIDER_DEFINE(lock); -SDT_PROBE_DEFINE1(lock, , , starvation, "u_int"); - CTASSERT(LOCK_CLASS_MAX == 15); struct lock_class *lock_classes[LOCK_CLASS_MAX + 1] = { @@ -120,14 +117,6 @@ static SYSCTL_NODE(_debug_lock, OID_AUTO, delay, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "lock delay"); -static u_int __read_mostly starvation_limit = 131072; -SYSCTL_INT(_debug_lock_delay, OID_AUTO, starvation_limit, CTLFLAG_RW, - &starvation_limit, 0, ""); - -static u_int __read_mostly restrict_starvation = 0; -SYSCTL_INT(_debug_lock_delay, OID_AUTO, restrict_starvation, CTLFLAG_RW, - &restrict_starvation, 0, ""); - void lock_delay(struct lock_delay_arg *la) { @@ -141,12 +130,6 @@ lock_delay(struct lock_delay_arg *la) la->delay <<= 1; if (__predict_false(la->delay > lc->max)) la->delay = lc->max; - - if (__predict_false(la->spin_cnt > starvation_limit)) { - SDT_PROBE1(lock, , , starvation, la->delay); - if (restrict_starvation) - la->delay = lc->base; - } } static u_int