Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F97644718
D35642.id107504.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D35642.id107504.diff
View Options
Index: sys/kern/kern_intr.c
===================================================================
--- sys/kern/kern_intr.c
+++ sys/kern/kern_intr.c
@@ -205,7 +205,7 @@
sched_clear_tdname(td);
#endif
thread_lock(td);
- sched_prio(td, pri);
+ sched_ithread_prio(td, pri);
thread_unlock(td);
}
Index: sys/kern/kern_timeout.c
===================================================================
--- sys/kern/kern_timeout.c
+++ sys/kern/kern_timeout.c
@@ -393,7 +393,7 @@
cc->cc_thread = td;
thread_lock(td);
sched_class(td, PRI_ITHD);
- sched_prio(td, PI_SOFTCLOCK);
+ sched_ithread_prio(td, PI_SOFTCLOCK);
TD_SET_IWAIT(td);
thread_lock_set(td, (struct mtx *)&cc->cc_lock);
thread_unlock(td);
Index: sys/kern/sched_4bsd.c
===================================================================
--- sys/kern/sched_4bsd.c
+++ sys/kern/sched_4bsd.c
@@ -924,6 +924,15 @@
turnstile_adjust(td, oldprio);
}
+void
+sched_ithread_prio(struct thread *td, u_char prio)
+{
+ THREAD_LOCK_ASSERT(td, MA_OWNED);
+ MPASS(td->td_pri_class == PRI_ITHD);
+ td->td_base_ithread_pri = prio;
+ sched_prio(td, prio);
+}
+
void
sched_user_prio(struct thread *td, u_char prio)
{
Index: sys/kern/sched_ule.c
===================================================================
--- sys/kern/sched_ule.c
+++ sys/kern/sched_ule.c
@@ -1925,6 +1925,18 @@
turnstile_adjust(td, oldprio);
}
+/*
+ * Set the base interrupt thread priority.
+ */
+void
+sched_ithread_prio(struct thread *td, u_char prio)
+{
+ THREAD_LOCK_ASSERT(td, MA_OWNED);
+ MPASS(td->td_pri_class == PRI_ITHD);
+ td->td_base_ithread_pri = prio;
+ sched_prio(td, prio);
+}
+
/*
* Set the base user priority, does not effect current running priority.
*/
Index: sys/kern/subr_busdma_bounce.c
===================================================================
--- sys/kern/subr_busdma_bounce.c
+++ sys/kern/subr_busdma_bounce.c
@@ -439,7 +439,7 @@
thread_lock(curthread);
sched_class(curthread, PRI_ITHD);
- sched_prio(curthread, PI_SWI(SWI_BUSDMA));
+ sched_ithread_prio(curthread, PI_SWI(SWI_BUSDMA));
thread_unlock(curthread);
for (;;) {
mtx_lock(&bounce_lock);
Index: sys/sys/proc.h
===================================================================
--- sys/sys/proc.h
+++ sys/sys/proc.h
@@ -257,6 +257,7 @@
#define td_siglist td_sigqueue.sq_signals
u_char td_lend_user_pri; /* (t) Lend user pri. */
u_char td_allocdomain; /* (b) NUMA domain backing this struct thread. */
+ u_char td_base_ithread_pri; /* (t) Base ithread pri */
struct kmsan_td *td_kmsan; /* (k) KMSAN state */
/* Cleared during fork1() */
Index: sys/sys/sched.h
===================================================================
--- sys/sys/sched.h
+++ sys/sys/sched.h
@@ -95,6 +95,7 @@
void sched_exit_thread(struct thread *td, struct thread *child);
u_int sched_estcpu(struct thread *td);
void sched_fork_thread(struct thread *td, struct thread *child);
+void sched_ithread_prio(struct thread *td, u_char prio);
void sched_lend_prio(struct thread *td, u_char prio);
void sched_lend_user_prio(struct thread *td, u_char pri);
void sched_lend_user_prio_cond(struct thread *td, u_char pri);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 1, 1:40 PM (21 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13253911
Default Alt Text
D35642.id107504.diff (3 KB)
Attached To
Mode
D35642: Add sched_ithread_prio to set the base priority of an interrupt thread.
Attached
Detach File
Event Timeline
Log In to Comment