On 7/14/22, Mark Johnston <[email protected]> wrote:
> The branch main has been updated by markj:
>
> URL:
> https://cgit.FreeBSD.org/src/commit/?id=6cbc4ceb7aa0042e969be7c782436391c579cc3a
>
> commit 6cbc4ceb7aa0042e969be7c782436391c579cc3a
> Author:     Mark Johnston <[email protected]>
> AuthorDate: 2022-07-14 19:34:02 +0000
> Commit:     Mark Johnston <[email protected]>
> CommitDate: 2022-07-14 19:34:02 +0000
>
>     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 &&

this reminds me that someone(tm) should add type checking to these

>           SCHED_AFFINITY(ts, CG_SHARE_L2)) {
>               if (cg->cg_flags & CG_FLAG_THREAD) {
>                       /* Check all SMT threads for being idle. */
>
>


-- 
Mateusz Guzik <mjguzik gmail.com>

Reply via email to