Date: Tue, 11 Nov 1997 18:34:12 -0500 (EST) From: David Petrou <dpetrou@kinclaith.pdl.cs.cmu.edu> To: freebsd-hackers@freebsd.org Subject: Why no priority check before need_resched() in wakeup()? Message-ID: <199711112334.PAA03845@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
Inside wakeup() and wakeup_one() there's a section of code with a comment that reads: /* OPTIMIZED EXPANSION OF setrunnable(p); */. This piece of code (among other things) marks a process as runnable and calls setrunqueue(). It also unconditionally calls need_resched() so that the scheduler will be invoked when leaving the kernel. My question is this: Why does this expansion of setrunnable() NOT check to see if the process's priority is better than the priority of the currently running process before calling need_resched()? If you look at the code for setrunnable(), you'll see that the check is there. Thanks, David
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711112334.PAA03845>