lkml.org 
[lkml]   [2007]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/5] Use macros instead of TASK_ flags
On Wed, Dec 05, 2007 at 01:56:22PM +0100, Ingo Molnar wrote:
> 1) please change 'is' and 'task' around so that it reads nicer:
>
> if (task_is_stopped(t))
>
> instead of the tongue-twister:
>
> if (is_task_stopped(t))

Sure, no problem. I vacillated on this order myself.

> 2) please change task_is_loadavg() to something more sensible - i didnt
> know what it meant when i first saw it in -mm's sched.c.
> task_is_uninterruptible() would be the logical choice ...

It's not obvious to me that "can't be interrupted by a signal" is the
same thing as "contributes to loadavg". Indeed, I think we would all
like to see a day where there's no such thing as an uninterruptible sleep,
but we'll still want at least some of those tasks contributing to loadavg.

You're right that task_is_loadavg() doesn't make much sense.
task_contributes_to_load() is a better name, but only marginally.

I've considered task_performing_io(), and name the corresponding bit
__TASK_PERFORMING_IO (or even just __TASK_DOING_IO or __TASK_IO), but
it's not just doing IO that makes a task contribute to loadavg.

I have no good suggestions here ;-(

--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."


\
 
 \ /
  Last update: 2007-12-06 16:45    [W:0.151 / U:1.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site