Messages in this thread | | | Date | Sat, 29 Apr 2006 02:11:16 +0530 | From | Balbir Singh <> | Subject | Re: schedstats: sched_info_switch() invocation without checking (prev != next) before |
| |
> > Look that sched_info_switch() is being invoked before verifying if the > prev and next tasks are different or not. IMHO the more logical place > to put sched_info_switch() function is inside the if (likely(prev != > next) { } block according to the comments mentioned previously. > > Any comments? >
Yes, I think your analysis seems correct. There is an advantages to calling sched_info_switch() before checking for prev != next in the if (likely()).
if prev == next, sched_info_switch() updates the task and runqueue statistics information (that helps keeping it up to date). This might be useful for SCHED_FIFO.
-- <--- Balbir - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |