The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=bd84094a51c4648a7c97ececdaccfb30bc832096
commit bd84094a51c4648a7c97ececdaccfb30bc832096 Author: Alexander Motin <m...@freebsd.org> AuthorDate: 2021-09-21 19:56:49 +0000 Commit: Alexander Motin <m...@freebsd.org> CommitDate: 2021-09-21 20:03:32 +0000 sched_ule(4): Fix interactive threads stealing. In scenarios when first thread in the queue can migrate to specified CPU, but later ones can't runq_steal_from() incorrectly returned NULL. MFC after: 2 weeks --- sys/kern/sched_ule.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 9bcc2a64e2b8..90f294bb0d4d 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -1110,10 +1110,12 @@ again: continue; rqh = &rq->rq_queues[bit + (i << RQB_L2BPW)]; TAILQ_FOREACH(td, rqh, td_runq) { - if (first && THREAD_CAN_MIGRATE(td) && - THREAD_CAN_SCHED(td, cpu)) - return (td); - first = td; + if (first) { + if (THREAD_CAN_MIGRATE(td) && + THREAD_CAN_SCHED(td, cpu)) + return (td); + } else + first = td; } } } _______________________________________________ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"