From owner-freebsd-current Fri Jun 14 0:41:12 2002 Delivered-To: freebsd-current@freebsd.org Received: from sccrmhc03.attbi.com (sccrmhc03.attbi.com [204.127.202.63]) by hub.freebsd.org (Postfix) with ESMTP id 7185237B406; Fri, 14 Jun 2002 00:40:39 -0700 (PDT) Received: from InterJet.elischer.org ([12.232.206.8]) by sccrmhc03.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020614074008.KPBD20219.sccrmhc03.attbi.com@InterJet.elischer.org>; Fri, 14 Jun 2002 07:40:08 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id AAA98000; Fri, 14 Jun 2002 00:24:46 -0700 (PDT) Date: Fri, 14 Jun 2002 00:24:45 -0700 (PDT) From: Julian Elischer To: Juli Mallett Cc: FreeBSD current users Subject: Re: KSE changes to ps In-Reply-To: <20020614000809.A12237@FreeBSD.ORG> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 14 Jun 2002, Juli Mallett wrote: > * Julian Elischer escriur=C3=A8res > > So the question is: what information can PS show=20 > > for a KSE threaded process? > >=20 > > I have been thinking of: > >=20 > > Certainly the first thing to decide it WHAT there is to show.. > > threads that are in userspace are not visible to ps, or for that matter > > the kernel, as teh Userland thread scheduler may switch between them > > without notifying the kernel. Only threads blocked in the kernel can sh= ow > > any information other than "running" For those in the userland there > > is only the information in the associated kse , and priority > > info from the thread is available. > >=20 > > so for a process you can show: > > process stuff (e.g. uid, pid, ppid) >=20 > Hopefully this won't change. >=20 > > kseg stuff (e.g. nice value, number runnable threads) >=20 > Nice value and stuff are exported anyway via kproc_info. kproc_info only has space for one KSEG. it currently gets filled out from fields in the KSEG and KSE and thread, by assuming that there is only one of each. It id oblivious to the possibility that there may be > 1 thread, or KSE or KSEG. We need to work out a new kernel interface to get all this information... :-) >=20 > Maybe we should look at packing an export_thread in there for exported ks= e > interfaces? >=20 > > kse stuff(e.g. RUNNING @ priority 32 on cpu0) > > kse stuff(e.g. RUNNING @ priority 31 on cpu1) = =20 > > runnable threads > > e.g. > > thread runnable priority 33 > > thread runnable priority 35 > > thread runnable priority 37 > > sleeping threads > > e.g. > > thread waiting at Mutex net1 prio 33 > > thread sleeping at "biord" prio 31 >=20 > This all has a simple solution. Export each thread as a process via kinf= o_\ > proc, and ps(1) will use the existing mtxname interfaces and such.. >=20 hmmmmm that isn't a stupid idea. > I don't know how simple this is at a code level. >=20 > > kseg stuff (for next kseg) > > ... > > =20 > >=20 > >=20 > > anyone have thoughts? >=20 > It'd be best to be able to poll the userland schedulers and the KSE stuff= via > the ptrace(2) interface, I think, or just export things using kinfo_proc = and > pad out the struct with things pertinent to KSE's. >=20 > Thanks. > --=20 > Juli Mallett FreeBSD: The Power T= o Serve > Perception is prejudice / Don't classify me / Accept me as me / Not what = you see >=20 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message