From owner-freebsd-arch Sun Aug 18 12:40:43 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A09E37B400 for ; Sun, 18 Aug 2002 12:40:41 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0273243E42 for ; Sun, 18 Aug 2002 12:40:40 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id TAA21457; Sun, 18 Aug 2002 19:40:29 GMT Date: Mon, 19 Aug 2002 05:46:24 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Julian Elischer Cc: Ian Dowse , Subject: Re: Solving the stack gap issue In-Reply-To: Message-ID: <20020819053656.V16172-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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