Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Nov 1996 09:45:51 -0700
From:      Steve Passe <smp@csn.net>
To:        Peter Wemm <peter@spinner.dialix.com>
Cc:        Poul-Henning Kamp <phk@critter.tfs.com>, freebsd-smp@freebsd.org
Subject:   Re: cvs commit: sys/i386/i386 locore.s swtch.s sys/i386/include  pmap.h 
Message-ID:  <199611251645.JAA01693@clem.systemsix.com>
In-Reply-To: Your message of "Mon, 25 Nov 1996 22:42:35 %2B0800." <199611251442.WAA01613@spinner.DIALix.COM> 

next in thread | previous in thread | raw e-mail | index | archive | help
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




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