freebsd-nq/sys/ia64/include
Marcel Moolenaar 4630415a47 Improve SMP support:
o  Allocate a VHPT per CPU. The VHPT is a hash table that the CPU
   uses to look up translations it can't find in the TLB. As such,
   the VHPT serves as a level 1 cache (the TLB being a level 0 cache)
   and best results are obtained when it's not shared between CPUs.
   The collision chain (i.e. the hash bucket) is shared between CPUs,
   as all buckets together constitute our collection of PTEs. To
   achieve this, the collision chain does not point to the first PTE
   in the list anymore, but to a hash bucket head structure. The
   head structure contains the pointer to the first PTE in the list,
   as well as a mutex to lock the bucket. Thus, each bucket is locked
   independently of each other. With at least 1024 buckets in the VHPT,
   this provides for sufficiently finei-grained locking to make the
   ssolution scalable to large SMP machines.
o  Add synchronisation to the lazy FP context switching. We do this
   with a seperate per-thread lock. On SMP machines the lazy high FP
   context switching without synchronisation caused inconsistent
   state, which resulted in a panic. Since the use of the high FP
   registers is not common, it's possible that races exist. The ia64
   package build has proven to be a good stress test, so this will
   get plenty of exercise in the near future.
o  Don't use the local ID of the processor we want to send the IPI to
   as the argument to ipi_send(). use the struct pcpu pointer instead.
   The reason for this is that IPI delivery is unreliable. It has been
   observed that sending an IPI to a CPU causes it to receive a stray
   external interrupt. As such, we need a way to make the delivery
   reliable. The intended solution is to queue requests in the target
   CPU's per-CPU structure and use a single IPI to inform the CPU that
   there's a new entry in the queue. If that IPI gets lost, the CPU
   can check it's queue at any convenient time (such as for each
   clock interrupt). This also allows us to send requests to a CPU
   without interrupting it, if such would be beneficial.

With these changes SMP is almost working. There are still some random
process crashes and the machine can hang due to having the IPI lost
that deals with the high FP context switch.

The overhead of introducing the hash bucket head structure results
in a performance degradation of about 1% for UP (extra pointer
indirection). This is surprisingly small and is offset by gaining
reasonably/good scalable SMP support.
2005-08-06 20:28:19 +00:00
..
pc
_bus.h Break out the definition of bus_space_{tag,handle}_t and a few other types 2005-04-18 21:45:34 +00:00
_inttypes.h
_limits.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
_regset.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
_stdint.h <stdint.h> should define WINT_M{AX,IN} independent from whether WCHAR_MIN is 2004-05-18 16:04:57 +00:00
_types.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
acpica_machdep.h Move the code for halting the CPU (acpi_cpu_c1) into machdep files. 2004-10-11 05:39:15 +00:00
asm.h nit in /*- 2005-01-31 08:16:45 +00:00
atomic.h Convert the atomic_ptr() operations over to operating on uintptr_t 2005-07-15 18:17:59 +00:00
bootinfo.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
bus_dma.h Refactor the bus_dma header files so that the interface is described in 2005-03-14 16:46:28 +00:00
bus.h Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
clock.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
cpu.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
cpufunc.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
db_machdep.h Implement functions calls from within DDB on ia64. On ia64 a function 2005-07-02 23:52:37 +00:00
dig64.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
efi.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
elf.h
endian.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
exec.h Use a common multi-inclusion protection, and add such a 2005-02-19 21:16:48 +00:00
float.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
floatingpoint.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
fpu.h Use primitive types to avoid creating an artificial header dependency: 2004-12-11 06:15:12 +00:00
frame.h
gdb_machdep.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
ia64_cpu.h For ia64_ptc_{e,g,ga,l}(), use instruction serialization. We 2005-08-06 19:54:31 +00:00
ieee.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
ieeefp.h
in_cksum.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
intr.h
intrcnt.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
kdb.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
limits.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
mca.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
md_var.h Enhance ia64_flush_dirty() to handle the case in which td != curthread. 2005-07-05 17:12:18 +00:00
memdev.h Remove extraneous ';'. 2004-08-01 18:51:44 +00:00
mutex.h
nexusvar.h
pal.h
param.h Reduce the default MAXCPU from 16 to 4. This is in preparation of 2005-08-06 19:59:23 +00:00
pcb.h As I said: the previous commit was untested... Remove an #endif which 2004-08-16 19:05:08 +00:00
pci_cfgreg.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
pcpu.h
pmap.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
pmc_mdep.h MFP4: 2005-06-09 19:45:09 +00:00
proc.h Improve SMP support: 2005-08-06 20:28:19 +00:00
profile.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
pte.h Remove struct ia64_itir and use a plain old uint64_t instead. 2004-11-21 21:40:08 +00:00
ptrace.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
reg.h
reloc.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
resource.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
runq.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
sal.h MFp4: 2004-09-19 03:50:46 +00:00
sapicreg.h
sapicvar.h
setjmp.h
sf_buf.h MFamd64 2004-04-18 07:11:12 +00:00
sigframe.h
signal.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
smp.h Improve SMP support: 2005-08-06 20:28:19 +00:00
stdarg.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
sysarch.h
ucontext.h
unwind.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
varargs.h
vmparam.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00