From owner-freebsd-threads@FreeBSD.ORG Wed Apr 16 11:06:25 2003 Return-Path: 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 93AEB37B401 for ; Wed, 16 Apr 2003 11:06:25 -0700 (PDT) Received: from mail.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id DDD2343F85 for ; Wed, 16 Apr 2003 11:06:22 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 22457 invoked from network); 16 Apr 2003 18:06:28 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 16 Apr 2003 18:06:28 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.8/8.12.8) with ESMTP id h3GI6JOv072878; Wed, 16 Apr 2003 14:06:20 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Wed, 16 Apr 2003 14:06:22 -0400 (EDT) From: John Baldwin To: Julian Elischer cc: threads@freebsd.org Subject: Re: struct thread X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2003 18:06:25 -0000 On 16-Apr-2003 Julian Elischer wrote: > > > On Wed, 16 Apr 2003, Jeff Roberson wrote: > >> Is td_last_kse necessary? What about td_lastcpu? They don't really seem >> to be used. > td_last_kse and td_last_cpu were used in some experimental cpu affinity > code that I gave up on (i.e. ran out of time). > The idea was that the system would attempt to first schedule > the thread on teh cpu it was last on , and if not available, on teh kse > that it last ran on. I never removed the items but was hoping that > someone, seeing the names there would feel tempted to > implement affinity.. (Alfred mumbled about trying it). kg_slpq isn't used either. >> >> Also, td_locks is unused, although it would be nice to have it >> implemented. > > I think ithis is a jhb field It used to be p_locks in struct proc used in the lockmgr code as the comment indicates and predates both SMPng and KSE: short td_locks; /* (k) DEBUG: lockmgr count of locks */ I have no attachment to it and it doesn't seem to be used anymore. >> td_sleeplocks should be ifdefed with WITNESS. > > ditto Is struct thread's size and layout part of the ABI as struct proc's is? I think it effectively is since libkvm is going to want to examine thread structures, so I'm afraid a variant sized struct thread would be a bad thing. Other than that, td_sleeplocks could be #ifdef WITNESS. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/