Re: bad call to sched_bind() => hang, even with INVARIANTS

看板FB_hackers作者時間11年前 (2014/05/19 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
On 5/15/14, 1:20 PM, Chris Torek wrote: > I was poking around with a bhyve emulation, where the emulation > has only one CPU but the real systems have more. > > In our real-system code we had a sched_bind() that just assumed there > were 2 or more CPUs, instead of just the 1. This caused the entire > system to hang. (Note: using SCHED_ULE.) > > It's not immediately obvious to me what went wrong "underneath" to > cause the whole-system hang, but clearly it is wrong to attempt to > pin a thread to a CPU that does not exist. Should sched_bind() > have a KASSERT in it to make sure that the cpu argument is > sensible? (Or maybe even something a little more aggressive?) A KASSERT() is probably a good idea. -- John Baldwin _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
文章代碼(AID): #1JUFLUeB (FB_hackers)
文章代碼(AID): #1JUFLUeB (FB_hackers)