From owner-freebsd-smp Mon Nov 25 08:46:38 1996 Return-Path: owner-smp Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA11865 for smp-outgoing; Mon, 25 Nov 1996 08:46:38 -0800 (PST) Received: from clem.systemsix.com (clem.systemsix.com [198.99.86.131]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id IAA11785 for ; Mon, 25 Nov 1996 08:46:23 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by clem.systemsix.com (8.6.12/8.6.12) with SMTP id JAA01693; Mon, 25 Nov 1996 09:45:51 -0700 Message-Id: <199611251645.JAA01693@clem.systemsix.com> X-Authentication-Warning: clem.systemsix.com: Host localhost didn't use HELO protocol X-Mailer: exmh version 1.6.5 12/11/95 From: Steve Passe To: Peter Wemm cc: Poul-Henning Kamp , freebsd-smp@freebsd.org Subject: Re: cvs commit: sys/i386/i386 locore.s swtch.s sys/i386/include pmap.h In-reply-to: Your message of "Mon, 25 Nov 1996 22:42:35 +0800." <199611251442.WAA01613@spinner.DIALix.COM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 25 Nov 1996 09:45:51 -0700 Sender: owner-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, > Going this way eliminates (for each reference to curproc): > - a 32 bit IO operation to the local apic (which Eric said should be > minimised if possible since IO is slow) > - a 32 bit 'and' operation > - a 24/32 bit barrel roll > - a multiplied by 4 index, 32 bit table lookup and dereference > - another 32 bit table lookup and dereference I thought of a shortcut for this awhile back but never tried it. Any code that is running inside the kernel and currently has the lock could skip this and determine which cpu it is with: #define LOCKED_CPUNUM() ((mp_lock & 0x0f000000) >> 24) you still have the shift, but the APIC access is eliminated. Send mail when something is ready to try, looks good so far, and I really want to get all 4 of Erich's CPUs running. -- Steve Passe | powered by smp@csn.net | FreeBSD