From owner-freebsd-alpha Wed Nov 13 12:26:48 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 345D337B404; Wed, 13 Nov 2002 12:26:47 -0800 (PST) Received: from alcanet.com.au (mail3.alcanet.com.au [208.178.117.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C2E843E4A; Wed, 13 Nov 2002 12:26:45 -0800 (PST) (envelope-from peter.jeremy@alcatel.com.au) Received: from sydsmtp01.alcatel.com.au (IDENT:root@localhost.localdomain [127.0.0.1]) by alcanet.com.au (8.12.4/8.12.4/Alcanet1.3) with ESMTP id gADKQcwL022135; Thu, 14 Nov 2002 07:26:38 +1100 Received: from gsmx07.alcatel.com.au ([139.188.20.247]) by sydsmtp01.alcatel.com.au (Lotus Domino Release 5.0.11) with ESMTP id 2002111407263763:26356 ; Thu, 14 Nov 2002 07:26:37 +1100 Received: from gsmx07.alcatel.com.au (localhost [127.0.0.1]) by gsmx07.alcatel.com.au (8.12.5/8.12.5) with ESMTP id gADKQbRL023760; Thu, 14 Nov 2002 07:26:37 +1100 (EST) (envelope-from peter.jeremy@alcatel.com.au) Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.12.5/8.12.5/Submit) id gADKQacx023759; Thu, 14 Nov 2002 07:26:36 +1100 (EST) (envelope-from peter.jeremy@alcatel.com.au) Date: Thu, 14 Nov 2002 07:26:36 +1100 From: Peter Jeremy To: John Baldwin Cc: alpha@FreeBSD.ORG Subject: Re: cvs commit: src/sys/conf files files.i386 files.pc98 Message-ID: <20021113202636.GA23652@gsmx07.alcatel.com.au> Mail-Followup-To: John Baldwin , alpha@FreeBSD.ORG References: <200211082233.gA8MXFSc085711@repoman.freebsd.org> Mime-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.4i X-MIMETrack: Itemize by SMTP Server on SYDSMTP01/AlcatelAustralia(Release 5.0.11 |July 24, 2002) at 14/11/2002 07:26:37 AM, Serialize by Router on SYDSMTP01/AlcatelAustralia(Release 5.0.11 |July 24, 2002) at 14/11/2002 07:26:38 AM, Serialize complete at 14/11/2002 07:26:38 AM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 2002-Nov-08 17:55:20 -0500, John Baldwin wrote: >Even with all this we still have a problem. :) The problem is that >the kernel is too big (well, .text is too big) for it to link with >our current atomic operation implementation. The problem is that in >order to optimize for the common case, our atomic operations branch >to a branch in the .text3 section in the failure case. We branch the >way we do to take advantage of branch prediction on the alpha. However, >the LINT kernel is so big that .text is large enough that the linker >cannot handle some of the relocations to places in .text3 resulting in >truncating the relocations. Any ideas on fixing this? Has any checked to see if arranging the atomic operation logic to avoid a forward branch in the success case actually provides a performance benefit? Unless the kernel is covered by either super-page or large-page ITB mappings, the cost of a likely ITB miss will outweigh the branch prediction benefits. There's also a probable Icache (and maybe other caches) miss. Also, not all the AXP implementations actually use the branch direction for prediction. The 2106xA variants all use a 2-bit history in the Icache (with a new line just inheriting whatever's left over from the previous entry). I'm not sure about more recent chips (I don't have the specs to hand). The only other option I can see is a new section tag that means "load this section after any similarly-named sections within the current module". This would push the forward branches to the end of the current module rather than the end of the kernel. The downside is that it means more custom hacks to gas and ld. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message