Date: Mon, 10 Nov 2008 09:57:44 -0800 From: "Murty, Ravi" <ravi.murty@intel.com> To: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Typo in ULE in FreeBSD 8.0 -- that's not really a bug Message-ID: <6D5D25EA3941074EB7734E51B16687040AD02A77@orsmsx506.amr.corp.intel.com>
next in thread | raw e-mail | index | archive | help
Hello All, I have been playing with ULE in 8.0 and while staring at tdq_notify noticed= an interesting (and what seems like a typo) problem. The intention of the function is obvious, send an IPI to notify the remote = CPU of some new piece of work. In the case where there is no IPI currently = pending on the target CPU and this thread should be preempting what's runni= ng there, the code checks in td (passed in as a parameter) is the IDLE thre= ad (TDF_IDLETD). If so, it checks the state and sees if idle is RUNNING and= if so figures it will notice this new work and we don't really need to sen= d an expensive IPI. However, why would td (parameter) ever be the IDLE thre= ad? It almost seems like this check will always fail and we end up sending = a hard IPI to the target CPU which works, but may not be needed. May be we = wanted to use PCPU->curthread instead of td? Thanks Ravi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6D5D25EA3941074EB7734E51B16687040AD02A77>