Re: [tip:sched/core] sched: Lower chances of cputime scaling overflow

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

 



On Thu, Apr 11, 2013 at 08:38:37AM -0700, Linus Torvalds wrote:
>     /* We know one of the values has a bit set in the high 32 bits */
>     for (;;) {
>         /* Make sure "stime" is the bigger of stime/rtime */
>         if (rtime > stime) {
>             u64 tmp = stime; stime = rtime; rtime = tmp;
>         }

For most workloads rtime is bigger than stime, so swapping those would
save some cycles on common cases. Otherwise this algorithm looks great.

Thanks
Stanislaw

--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux