From 6cbc4ceb7aa0042e969be7c782436391c579cc3a Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Thu, 14 Jul 2022 15:34:02 -0400 Subject: [PATCH] sched_ule: Use the correct atomic_load variant for tdq_lowpri Reported by: tuexen Fixes: 11484ad8a2b0 ("sched_ule: Use explicit atomic accesses for tdq fields") --- sys/kern/sched_ule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index d23e43a2fbcb..14d6e689081d 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -1360,7 +1360,7 @@ sched_pickcpu(struct thread *td, int flags) * expired and it is idle, run it there. */ if (THREAD_CAN_SCHED(td, ts->ts_cpu) && - atomic_load_int(&tdq->tdq_lowpri) >= PRI_MIN_IDLE && + atomic_load_char(&tdq->tdq_lowpri) >= PRI_MIN_IDLE && SCHED_AFFINITY(ts, CG_SHARE_L2)) { if (cg->cg_flags & CG_FLAG_THREAD) { /* Check all SMT threads for being idle. */