Re: [PATCH 2/5] Use macros instead of TASK_ flags

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

 



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."
--
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