lkml.org 
[lkml]   [2002]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [o(1) sched J0] higher priority smaller timeslices, in fact
On Wed, 16 Jan 2002, Alexei Podtelezhnikov wrote:

> I still suggest a different set as faster and more readable at least to
> me. Just two operations instead of 4!
>
> #define NICE_TO_TIMESLICE(n) (((n)+21)*(HZ/10)) // should be positive!
> #define MAX_TIMESLICE NICE_TO_TIMESLICE(19)
> #define MIN_TIMESLICE NICE_TO_TIMESLICE(-20)

Looks more readable. I wouldn't bet on faster, but definitely more
readable.

--
bill davidsen <davidsen@tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:15    [W:0.073 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site