Re: schedstats: sched_info_switch() invocation without checking (prev != next) before

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux