Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Aug 2002 05:46:24 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Julian Elischer <julian@elischer.org>
Cc:        Ian Dowse <iedowse@maths.tcd.ie>, <arch@FreeBSD.ORG>
Subject:   Re: Solving the stack gap issue 
Message-ID:  <20020819053656.V16172-100000@gamplex.bde.org>
In-Reply-To: <Pine.BSF.4.21.0208181024530.35342-100000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 18 Aug 2002, Julian Elischer wrote:

> On Sun, 18 Aug 2002, Ian Dowse wrote:
> >
> > If there is agreement on the td vs. curthread issue, then that would
> > obviously be easy to change.
>
> A few days ago, Peter gave some comments as to the expense of using
> curthread. I must admit this is something where some architectureal
> guidance would be a good thing.... maybe something like
> "Use a local if you need to access a Per-cpu variable more than twice
> in a function", and "passing a thread pointer as an argument (is/is not)
> preferable to calling curtread explicitly in the child function".

I think passing around pointers equal to curthread won't exactly help
efficiency on most machines.  I think it is slower at runtime and only
faster at compile time on i386's with the current implementation.
kern/*c seems to have approximately the same number of references to
curthread as callers that take a td arg.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020819053656.V16172-100000>