From owner-freebsd-current Fri Feb 2 7:13: 3 2001 Delivered-To: freebsd-current@freebsd.org Received: from syncopation-01.iinet.net.au (syncopation-01.iinet.net.au [203.59.24.37]) by hub.freebsd.org (Postfix) with SMTP id D786437B401 for ; Fri, 2 Feb 2001 07:12:43 -0800 (PST) Received: (qmail 16746 invoked by uid 666); 2 Feb 2001 15:20:01 -0000 Received: from reggae-14-13.nv.iinet.net.au (HELO elischer.org) (203.59.77.13) by mail.m.iinet.net.au with SMTP; 2 Feb 2001 15:20:01 -0000 Message-ID: <3A7ACE50.7B13BFBB@elischer.org> Date: Fri, 02 Feb 2001 07:12:16 -0800 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Peter Jeremy Cc: current@FreeBSD.ORG Subject: Re: kernel threading: the first steps [patch] References: <200101270833.AAA75738@InterJet.elischer.org> <20010129155033.K52423@gsmx07.alcatel.com.au> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Peter Jeremy wrote: > > On 2001-Jan-27 00:33:23 -0800, Root Dude wrote: > >I've broken the proc structure into 4 structures. > > Leaving aside the issue of whether or your efforts were a waste of time, > I have some comments on the ordering of fields. Since the fields are > being re-arranged anyway, I'd like to suggest that the implementation > characteristics be taken into account. I'm mainly thinking of padding > between fields here. > > A second, far less important issue is the interaction between field > order and code size on the IA32. Given that most structure references > are base+offset, there's an extra 3-byte overhead in accessing fields > more than 127 bytes from the pointer - there's no direct speed penalty > except on the 80386, but there is an indirect penalty for larger code > (ie bigger cache footprint). This suggests that fields with a high > static reference count should be towards the front of structures. to counter this, it has been reported that puting fields elsewher can reduce cache thrashing as most structures have the important fields at the front. It's hard to know which effect would be greater.. :-) > > Peter -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000-2001 ---> X_.---._/ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message