Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 02 Feb 2001 07:12:16 -0800
From:      Julian Elischer <julian@elischer.org>
To:        Peter Jeremy <peter.jeremy@alcatel.com.au>
Cc:        current@FreeBSD.ORG
Subject:   Re: kernel threading: the first steps [patch]
Message-ID:  <3A7ACE50.7B13BFBB@elischer.org>
References:  <200101270833.AAA75738@InterJet.elischer.org> <20010129155033.K52423@gsmx07.alcatel.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Peter Jeremy wrote:
> 
> On 2001-Jan-27 00:33:23 -0800, Root Dude <julian@elischer.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A7ACE50.7B13BFBB>