lkml.org 
[lkml]   [2006]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: sched: 64-bit nr_running
From
Date
On Mon, 2006-05-15 at 18:34 +0200, Ingo Molnar wrote:

> well for performance it's usually best to just have the native
> machine
> word size (i.e. long), unless there's some compelling data-structure
> size argument. In any case it's not uncommon to use 'long' for such
> types, even though some other aspect of the kernel limits it to less
> than 64 (or even 32) bits.

I also noticed that struct task_struct -> state uses a volatile long ,
but it seems to only use a few bits . exit_state also uses a long type
and only uses a few bits .. They could be combined into one long (or
even and int) .. I noticed the comment below,

* We have two separate sets of flags: task->state
* is about runnability, while task->exit_state are
* about the task exiting. Confusing, but this way
* modifying one set can't modify the other one by
* mistake.

I think if it was all inside macro's it wouldn't be so easy to
accidentally set the exit_state when touching just state ..

Daniel

-
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: 2006-05-15 19:51    [W:0.058 / U:0.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site