Misc. Design Issues

It looks like we'll be abandoning the apic_id as a table index, and reverting back to cpu-specific pages. The apic id and logical cpu number will be present in the page and will be maintained by swtch(). The IO operation penalty to access the local apic is too great when we can avoid it. Unfortunately this requires that we finish the idle loop support (get rid of the busy-spin idleprocs) and have a per-cpu idle context. That means that there will be for each cpu: 1 page directory table page, 1 pde page, 1 pcb, 1 kstack, 1 "idle" context (a cut-down process) that will not appear on the 'ps' listing. There will be a set of variables at a fixed virtual address in the unique page. Things like curproc, curpcb, runtime will be in there. Each page will be double mapped into "normal" kernel VM space. There will be a new P_ONCPU process flag, and a table pointing to all the cpu's private pages in "normal" space. ie: if you need to send a pmap_update to a currently running process (ie: P_ONCPU set), you check against your curproc, then walk the tables to see which other cpu is currently running it.