Messages in this thread | | | Subject | Re: check cpu_online() in nr_running() | From | Alan Cox <> | Date | 25 Feb 2003 18:32:43 +0000 |
| |
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/
| |