Expand a comment in lwkt_switch().
authorNuno Antunes <nuno.antunes@gmail.com>
Thu, 13 Sep 2012 07:07:08 +0000 (08:07 +0100)
committerNuno Antunes <nuno.antunes@gmail.com>
Thu, 13 Sep 2012 10:08:37 +0000 (11:08 +0100)
sys/kern/lwkt_thread.c

index bf6e0e7..10d168e 100644 (file)
@@ -774,7 +774,9 @@ lwkt_switch(void)
                /*
                 * Never schedule threads returning to userland or the
                 * user thread scheduler helper thread when higher priority
-                * threads are present.
+                * threads are present.  The runq is sorted by priority
+                * so we can give up traversing it when we find the first
+                * low priority thread.
                 */
                if (ntd->td_pri < TDPRI_KERN_LPSCHED) {
                        ntd = NULL;