kdb
[Top] [All Lists]

Re: [patch] fix 'ps' command in ia64 2.6 kdb

To: Martin Pool <mbp@xxxxxxxxx>
Subject: Re: [patch] fix 'ps' command in ia64 2.6 kdb
From: Keith Owens <kaos@xxxxxxx>
Date: Tue, 12 Aug 2003 18:50:59 +1000
Cc: xavier.bru@xxxxxxxx, kdb@xxxxxxxxxxx
In-reply-to: Your message of "Tue, 12 Aug 2003 18:08:02 +1000." <20030812080800.GF1121@vexed.ozlabs.hp.com>
Sender: kdb-bounce@xxxxxxxxxxx
On Tue, 12 Aug 2003 18:08:02 +1000, 
Martin Pool <mbp@xxxxxxxxx> wrote:
>On 12 Aug 2003, Keith Owens <kaos@xxxxxxx> wrote:
>> num_online_cpus()
>
>By my reading that does not give what we want here.  In a machine with
>eight CPUs and all are down but CPU7, then num_online_cpus() will
>return 1.
>
>In the light of the nonlinear/hotplug CPU work in 2.5, I think looping
>up to NR_CPUS and checking cpu_online really is the right way to do
>it.  (But I know much less about it than other people.)

Good point.  Change the code to loop to NR_CPUS and check cpu_online.
There is no need to check if there is a task for a online cpu, the code
in sched.c ensures that all cpus have a known task.


<Prev in Thread] Current Thread [Next in Thread>