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 16:49:56 +1000
Cc: xavier.bru@xxxxxxxx, kdb@xxxxxxxxxxx
In-reply-to: Your message of "Tue, 12 Aug 2003 15:59:00 +1000." <20030812055859.GD1121@xxxxxxxxxxxxxxxxxxx>
Sender: kdb-bounce@xxxxxxxxxxx
On Tue, 12 Aug 2003 15:59:00 +1000, 
Martin Pool <mbp@xxxxxxxxx> wrote:
>--- linux-2.6.0test2-ia64-kdb-orig/kdb/kdbmain.c       2003-08-12 
>15:46:44.000000000 +1000
>+++ linux-2.6.0test2-ia64-kdb/kdb/kdbmain.c    2003-08-12 15:30:52.000000000 
>+1000
>@@ -2959,12 +2959,20 @@ kdb_ps(int argc, const char **argv, cons
>       mask = kdb_task_state_string(argc, argv, envp);
>       /* Run the active tasks first */
>       for (cpu = 0; cpu < NR_CPUS; ++cpu) {

That line is wrong.  In kdb v4.3 it reads

        for (cpu = 0; cpu < smp_num_cpus; ++cpu) {

which, together with code in sched.c that ensures kdb_active_task[cpu]
is always set, removes the need for the other tests.  IOW,
kdb_active_task[cpu] is always defined.

>+      /* FIXME: Running tasks are printed out twice: once above for
>+       * the CPU, and then again here. */

Deliberately so.  The first bit displays the tasks that own the cpus,
the second bit displays all of the tasks.  It is harder for the user if
they have to hunt between the two sections to find processes, a little
bit of duplication to assist the user is no big deal.


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