p_cpu member to struct proc. Use this in certain places when
accessing scheduler state, etc. For the single-processor case,
just initialize p_cpu in fork1() to avoid having to set it in the
low-level context switch code on platforms which will never have
multiprocessing.
While I'm here, comment a few places where there are known issues
for the SMP implementation.
state into global and per-CPU scheduler state:
- Global state: sched_qs (run queues), sched_whichqs (bitmap
of non-empty run queues), sched_slpque (sleep queues).
NOTE: These may collectively move into a struct schedstate
at some point in the future.
- Per-CPU state, struct schedstate_percpu: spc_runtime
(time process on this CPU started running), spc_flags
(replaces struct proc's p_schedflags), and
spc_curpriority (usrpri of processes on this CPU).
- Every platform must now supply a struct cpu_info and
a curcpu() macro. Simplify existing cpu_info declarations
where appropriate.
- All references to per-CPU scheduler state now made through
curcpu(). NOTE: this will likely be adjusted in the future
after further changes to struct proc are made.
Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
- If RB_ASKNAME, only dumpdv holds the results asked interactively.
Examie dumpspec only when !RB_ASKNAME. This allows us to override
dumps on none in kernel config file by booting kernel with RB_ASKNAME.
- Slightly rearrange code so that it more matches to comment.
execute certain functions when a process does an exec(). Currently
uses a global list. Could possibly be done using a per-process list,
but this needs more thought.
given buffer, and if necessary, reducing the display width of the
number to fit in the buffer by increasing the units (from kilobytes
(2^10) through to exabytes (2^60)).
UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code. i provided some help
getting swap and paging working, and other bug fixes/ideas. chuck
silvers <chuq@chuq.com> also provided some other fixes.
this is the rest of the MI portion changes.
this will be KNF'd shortly. :-)
- If RB_ASKNAME, prompt for the dump device, defaulting to
partition 'b' of the root device, if the root device is a disk.
- Else, if dumpspec is set to "none", do not configure a dump device.
- Else, if dumpspec is set by config(8), attempt to use that device.
- Else, dumpspec is wildcarded or unspecified; if the root device is
a disk, select partition b. (which was the previous default dump
partition)
Note, dumps to a local disk now work even if root is on nfs.