From owner-freebsd-threads@FreeBSD.ORG Wed Feb 1 19:34:31 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8FA6216A420 for ; Wed, 1 Feb 2006 19:34:31 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id CEAAF43D49 for ; Wed, 1 Feb 2006 19:34:30 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.5/8.13.5/NETPLEX) with ESMTP id k11JYQwN014298; Wed, 1 Feb 2006 14:34:26 -0500 (EST) Date: Wed, 1 Feb 2006 14:34:25 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Julian Elischer In-Reply-To: <43E109F1.6020304@elischer.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: Ilya E Veretenkin , freebsd-threads@freebsd.org Subject: Re: getting particular thread cpu time X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2006 19:34:31 -0000 On Wed, 1 Feb 2006, Julian Elischer wrote: > Daniel Eischen wrote: > > >Libpthread is M:N by default, so the kernel doesn't know about > >userland threads. > > > > > > though we might think about ways that we can get that information.. > maybe a way that the user thread scheduler can be asked for the info? We don't currently maintain per-thread system and user time. It's not just that either, there has to be some way to identify each thread and the kernel would need that info (name, thread id, ??) also. You _could_ add pthread_getrusage_np(), or something like that, to the threads libraries which would make it visible to the application, but I hesitate to think this information would be useful to the kernel so that ps and top can show it. I think ps and top should just show the kernel entities and that's it. I wouldn't strongly oppose making these utilities show userland thread info as long as it didn't impact performance. -- DE