From owner-freebsd-current@FreeBSD.ORG Wed Nov 14 01:25:14 2007 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D53A416A417 for ; Wed, 14 Nov 2007 01:25:14 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outB.internet-mail-service.net (outB.internet-mail-service.net [216.240.47.225]) by mx1.freebsd.org (Postfix) with ESMTP id BD74F13C457 for ; Wed, 14 Nov 2007 01:25:14 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Tue, 13 Nov 2007 17:24:45 -0800 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id A77EC1269FD; Tue, 13 Nov 2007 17:24:44 -0800 (PST) Message-ID: <473A4E5E.3080404@elischer.org> Date: Tue, 13 Nov 2007 17:24:46 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Kris Kennaway References: <473A4570.9020908@FreeBSD.org> In-Reply-To: <473A4570.9020908@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: julian@FreeBSD.org, current@FreeBSD.org Subject: Re: Loss of detail from kthreads X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2007 01:25:14 -0000 Kris Kennaway wrote: > Hi, > > Since the conversion from kprocs to kthreads there is a loss of > precision in how kernel process names are reported, because they now > mostly report the kproc name which is very generic. > > e.g. if you only use top -S then you only have "idle", "intr" processes, > etc. You have to use top -SH, but then you also see the userland > threads, and there might be hundreds of them obscuring the kernel . there were dozens of interrupt threads obscuring things too. now there aren't. Sounds like you'd like an option -K to just look at the kernel? top -K > threads. Also, ps now only displays the kproc: well if you ask it to it'' show the kthreads. root@trafmon1:ps -opid,tdnam,comm -xH PID THRDNAME COMMAND 0 kernel 1 init 2 g_event 3 g_up 4 g_down 5 thread taskq 6 acpi_task_0 7 acpi_task_1 8 acpi_task_2 9 kqueue taskq 10 audit 11 idle: cpu3 idle/idle: cpu3 11 idle: cpu2 idle/idle: cpu2 11 idle: cpu1 idle/idle: cpu1 11 idle: cpu0 idle/idle: cpu0 12 swi4: clock sio intr/swi4: clock sio 12 swi3: vm intr/swi3: vm 12 swi1: net intr/swi1: net 12 swi5: + intr/swi5: + 12 swi6: Giant task intr/swi6: Giant task 12 swi6: task queue intr/swi6: task queue 12 swi2: cambio intr/swi2: cambio 12 irq9: acpi0 intr/irq9: acpi0 12 swi0: uart sio intr/swi0: uart sio 12 irq14: ata0 intr/irq14: ata0 12 irq15: ata1 intr/irq15: ata1 12 irq28: bge0 intr/irq28: bge0 12 irq29: bge1 intr/irq29: bge1 12 irq20: fxp0 intr/irq20: fxp0 12 irq1: atkbd0 intr/irq1: atkbd0 12 irq12: psm0 intr/irq12: psm0 13 yarrow if you want that done by default someway then let's hear what you'd like to do.. My plan is to add a -K option that is the equivalent of -SH in top and the above in ps. I haven't investigated allthe versions of ps yet to decide what it should be. we could make -S in top show all the kernel threads if you wanted to.. but that's a bikeshed I'll let you fight.. it would be relatively trivial change to do this.. > > root 12 100.0 0.0 0 136 ?? RL Sat01PM 6:28.30 [intr] > > so you can't see which interrupt(s) are using CPU. > > Finally, I noticed that DDB only displays the kproc name in e.g. allpcpu: > > cpuid = 1 > curthread = 0xcb41da50: pid 12 "intr" > curpcb = 0xe992cd90 > fpcurthread = none > idlethread = 0xc67b7420: pid 11 "idle" > APIC ID = 1 > currentldt = 0x50 > > Probably other things are also affected. All of these make kernel > analysis and debugging much less convenient, so this seems to me to be a > step backwards. Are you still working on fixing these issues? yes but distracted by $DAYJOB ddb shows the thread name if you do 'ps' I think pcpu should always show the thread name if it exists. > > Kris