| Age | Commit message (Collapse) | Author |
|
This uses hard interrupts to check progress of low-priority soft
interrupts, and one CPU to check progress of another CPU.
If no progress has been made after a configurable number of seconds
(kern.heartbeat.max_period, default 15), then the system panics --
preferably on the CPU that is stuck so we get a stack trace in dmesg
of where it was stuck, but if the stuckness was detected by another
CPU and the stuck CPU doesn't acknowledge the request to panic within
one second, the detecting CPU panics instead.
This doesn't supplant hardware watchdog timers. It is possible for
hard interrupts to be stuck on all CPUs for some reason too; in that
case heartbeat(9) has no opportunity to complete.
Downside: heartbeat(9) relies on hardclock to run at a reasonably
consistent rate, which might cause trouble for the glorious tickless
future. However, it could be adapted to take a parameter for an
approximate number of units that have elapsed since the last call on
the current CPU, rather than treating that as a constant 1.
XXX kernel revbump -- changes struct cpu_info layout
|
|
NFCI.
|
|
Work around regression introduced in rev 1.92:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/kern_cpu.c#rev1.92
by which ``cpuctl offline n'' became broken on architectures without
__HAVE_INTR_CONTROL (i.e., everything other than alpha and x86);
cpu_setintr() always fails on these archs, and we had neglected
return value from that function until rev 1.91.
XXX
As martin pointed out in the PR, I'm not sure whether fix in rev 1.92
itself is correct or not. Insert XXX comment referring the PR there....
|
|
|
|
|
|
at the time we had mutex_obj_alloc() but not __cacheline_aligned.
|
|
|
|
|
|
- Use cegger@'s ACPI SRAT parsing code to figure out NUMA node ID for each
CPU as it is attached.
- For scheduler experiments with SMT, flag CPUs with the lowest numbered SMT
IDs as "primaries", link back to the primaries from secondaries, and build
a circular list of CPUs in each package with identical SMT IDs.
- No need for package/core/smt/numa IDs to be anything other than a u_int.
|
|
|
|
|
|
|
|
|
|
in UVM, excluding uvmexp.free, which needs special treatment and will be
done with a separate commit. Cuts system time for a build by 20-25% on
a 48 CPU machine w/DIAGNOSTIC.
- Avoid 64-bit integer divide on every fault (for rnd_add_uint32).
|
|
|
|
circular list of peer CPUs in other packages, so we might scroll through
them in the scheduler when looking to distribute or steal jobs.
- Fold the run queue data structure into spc_schedstate. Makes kern_runq.c
a far more pleasant place to work.
- Remove the code in sched_nextlwp() that tries to steal jobs from other
CPUs. It's not needed, because we do the very same thing in the idle LWP
anyway. Outside the VM system this was one of the the main causes of L3
cache misses I saw during builds. On my machine, this change yields a
60%-70% drop in time on the "hackbench" benchmark (there's clearly a bit
more going on here, but basically being less aggressive helps).
|
|
to make circular lists of CPU siblings in the same core, and in the
same package. Nothing fancy, just enough to have a bit of fun in the
scheduler trying out different tactics.
|
|
This was a very nice win in my tests on a 48 CPU box.
- Reorganise cpu_data slightly according to usage.
- Put cpu_onproc into struct cpu_info alongside ci_curlwp (now is ci_onproc).
- On x86, put some items in their own cache lines according to usage, like
the IPI bitmask and ci_want_resched.
|
|
instead of aprint_error().
there's an error returned to userland and displayed by cpuctl.
|
|
conform to xcfunc_t callback typedef (-Wcast-function-type).
Same object code is generated.
|
|
explain things.
Discussed with rmind
|
|
panic in firmware_malloc().
|
|
|
|
|
|
ok christos@, via tech-kern@
|
|
function
|
|
|
|
(pppattach(), putterattach(), etc.) already do. This means that pseudo
attach function will be able to become a constructor.
|
|
firmware_free now uses kmem_free(9) instead of free(9),
so we need to pass a correct size to it.
|
|
All have been set to "nodiscard"; some should get a real implementation.
|
|
now this can actually work
hi christos
|
|
|
|
designated initializers.
I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
|
|
|
|
its uses with cpu_infos array. Extra testing by christos@.
|
|
current CPU, and use it if a CPU is taken offline
-add a bool argument to pcu_discard which tells whether the internal
"LWP has used the coprocessor" flag should be set or reset. The flag
is reported by pcu_used_p(). If set, future accesses should use the
state stored in the PCB. If reset, it should be reset to default.
The former case is useful for setmcontext().
With that, it should not be necessary anymore to manage the "FPU used"
state by an additional MD variable.
approved by matt
|
|
update API inside COMPAT_60
|
|
Add a ci_cpuname for convenience
|
|
Contrary to the AMD implementation, it doesn't use xcalls to distribute
the update to all CPUs but relies on cpuctl(8) to bind itself to the
right CPU -- to keep it simple and avoid possible problems with
hyperthreading.
Also, it doesn't parse the vendor supplied file to pick the right
part for the present CPU model but relies on userland to prepare
files with specific filenames. I'll commit a pkg for this in a minute
(pkgsrc/sysutils/intel-microcode).
The ioctl interface changed; compatibility is provided (should be
limited to COMPAT_NETBSD6 as soon as this is available).
|
|
|
|
- Add kcpuset_running which gets set in idle_loop().
- Use kcpuset_running in pserialize_perform().
|
|
ok wiz@ for the manpages
ok elad@
|
|
Implemented and enabled via CPU_UCODE kernel config option
for x86 and Xen Dom0.
Tested on different AMD machines with different
CPU families.
ok wiz@ for the manpages
ok releng@
ok core@ via releng@
|
|
|
|
ID). Report this as the HwID in cpuctl.
OK jruoho@.
|
|
- Add kcpuset_atomic_set(), kcpuset_atomic_clear() and kcpuset_merge().
|
|
|
|
Suitable for use during the early boot. MD and other implementations
should be replaced with this interface.
Discussed on: tech-kern@
|
|
cpu_lookup.
|
|
|