lkml.org 
[lkml]   [2003]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: check cpu_online() in nr_running()
From
Date
On Tue, 2003-02-25 at 16:33, William Lee Irwin III wrote:
> for (i = 0; i < NR_CPUS; i++)
> + if (!cpu_online(i))
> + continue;
> sum += cpu_rq(i)->nr_running;

I smell donkey poo 8)

If the change is right, which seems reasonable then I think you
need some { } 's too. Its also a hot path so it may be a lot
cleaner to keep the jump out of this by just letting
nr_running be zero for other processors ?

-
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:33    [W:0.043 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site