kdb
[Top] [All Lists]

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

To: Keith Owens <kaos@xxxxxxx>
Subject: Re: [patch] fix 'ps' command in ia64 2.6 kdb
From: Martin Pool <mbp@xxxxxxxxx>
Date: Tue, 12 Aug 2003 17:26:29 +1000
Cc: xavier.bru@xxxxxxxx, kdb@xxxxxxxxxxx
In-reply-to: <3569.1060670996@xxxxxxxxxxxxxxxxxxxxxx>
References: <20030812055859.GD1121@xxxxxxxxxxxxxxxxxxx> <3569.1060670996@xxxxxxxxxxxxxxxxxxxxxx>
Sender: kdb-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.4i
On 12 Aug 2003, Keith Owens <kaos@xxxxxxx> wrote:
> On Tue, 12 Aug 2003 15:59:00 +1000, 
> Martin Pool <mbp@xxxxxxxxx> wrote:
> >+++ 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.

Thanks for explaining that.  There doesn't seem to be any variable
smp_num_cpus on ia64 2.6.0test2.  (I realize your patch is just for
2.4 but I was trying to port it forward.)  I'll try to work out what
happened to it.

> >+    /* 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.

OK.  I was going to make it consistent with bta, but I suppose the
information is so much larger there that we have to avoid the
duplicate.

-- 
Martin 

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