git: c7aa0304d5b5 - main - Run softclock threads at a hardware ithread priority.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 21 Apr 2022 19:02:33 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=c7aa0304d5b5443340fc7920975743cfe2c0fca3
commit c7aa0304d5b5443340fc7920975743cfe2c0fca3
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-21 17:40:01 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-21 17:40:01 +0000
Run softclock threads at a hardware ithread priority.
Add a new PI_SOFTCLOCK for use by softclock threads. Currently this
maps to PI_AV which is the second-highest ithread priority.
Reviewed by: mav, kib
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D33693
---
sys/kern/kern_timeout.c | 2 +-
sys/sys/priority.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index db4217114c35..121ee2b13f46 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -393,7 +393,7 @@ start_softclock(void *dummy)
cc->cc_thread = td;
thread_lock(td);
sched_class(td, PRI_ITHD);
- sched_prio(td, PI_SWI(SWI_CLOCK));
+ sched_prio(td, PI_SOFTCLOCK);
TD_SET_IWAIT(td);
thread_lock_set(td, (struct mtx *)&cc->cc_lock);
thread_unlock(td);
diff --git a/sys/sys/priority.h b/sys/sys/priority.h
index 60327cf20293..428be2d02c68 100644
--- a/sys/sys/priority.h
+++ b/sys/sys/priority.h
@@ -87,6 +87,7 @@
#define PI_REALTIME (PRI_MIN_ITHD + 0)
#define PI_AV (PRI_MIN_ITHD + 4)
+#define PI_SOFTCLOCK PI_AV
#define PI_NET (PRI_MIN_ITHD + 8)
#define PI_DISK (PRI_MIN_ITHD + 12)
#define PI_TTY (PRI_MIN_ITHD + 16)