XXX These drivers don't check whether enm_addrlo and enm_addrhi are the same
or not, so it won't work correctly if an multicast address entry has a range.
The method for assigning pages to buckets in the non-NUMA case sucks. It
can defeat memory interleaving in the hardware, and not distribute pages
fairly by colour. To fix this and make things more deterministic, take the
physical PFN and colour into account.
Then when freeing pages, in the non-NUMA case don't change the page's bucket
either. Keeping the bucket number stable will also permit partitioning page
replacement state by CPU package / NUMA node.
been marked as sd_gone. Otherwise we might try to uiomove() data from
memory that has been unmapped, resulting in EFAULT.
XXX This (along with other pre-existing checks st->sd_gone) is still
racy, but it's an improvement over current code. Ideally we would
make a complete copy of the symbol table when we open /dev/ksyms so
we could ignore any changes that occur.
ad@ says "good enough for now"
XXX Pullup to -9 and -8
on a different CPU in the same CPU core as the parent, because both parent
and child share lots of state. (I want to come back later and do
something different for _lwp_create() and maybe execve().)
- Remove the runqueue evcnts, which are racy and impose a penalty for very
little payoff.
- Break out of the loop in sched_takecpu() as soon as we have a CPU that can
run the LWP. There's no need to look at all CPUs.
- SPCF_IDLE in sched_enqueue() so we know the CPU is not idle sooner.
Ported from DragonFlyBSD, but this target had originally existed in
Linux kernel. See below for details.
https://www.kernel.org/doc/Documentation/device-mapper/delay.txt
Due to "tick" in hz(9) not working (which results in dmdlthread spinning
forever in _submit_queue() without dp extracted from delayed list
and queued into submit list), this hasn't been hooked to dm.kmod yet.
taken-from: DragonFlyBSD
The file name matching code in libedit tries to adjust to the presence
of explicit " or ' characters in the input line, but tries too hard.
Remove a conditional that goes overboard, and causes the completion
code to fail if a quoted string is seen before the filename to be
expanded, as in
grep 'foo' bar<TAB>
Before this change, the above would not expand any possible
completions, even if they existed, because it would choose to look for
files whose names started with " bar".
my test machine:
- Replace the global pv_hash with a per-pmap record of dynamically allocated
pv entries. The data structure used for this can be changed easily, and
has no special concurrency requirements. For now go with radixtree.
- Change pmap_pdp_cache back into a pool; cache the page directory with the
pmap, and avoid contention on pmaps_lock by adjusting the global list in
the pool_cache ctor & dtor. Align struct pmap and its lock, and update
some comments.
- Simplify pv_entry lists slightly. Allow both PP_EMBEDDED and dynamically
allocated entries to co-exist on a single page. This adds a pointer to
struct vm_page on x86, but shrinks pv_entry to 32 bytes (which also gets
it nicely aligned).
- More elegantly solve the chicken-and-egg problem introduced into the pmap
with radixtree lookup for pages, where we need PTEs mapped and page
allocations to happen under a single hold of the pmap's lock. While here
undo some cut-n-paste.
- Don't adjust pmap_kernel's stats with atomics, because its mutex is now
held in the places the stats are changed.
- Add some simple SMT awareness. Try to keep as many different cores loaded
up with jobs as possible before we start to make use of SMT. Have SMT
"secondaries" function more as helpers to their respective primaries.
This isn't enforced, it's an effort at herding/encouraging things to go in
the right direction (for one because we support processor sets and those
can be configured any way that you like). Seen at work with "top -1".
- Don't allow sched_balance() to run any faster than the clock interrupt,
because it causes terrible cache contention. Need to look into this in
more detail because it's still not ideal.
Keep the names of functions internally as ptrace intact as this code
is shared with core_elf32.c that already reaches ptrace(2) specifc symbols.
No functional change intended.
fetch them when necessary. allow for fallback uses of older
time sources if others are not present.
this stops vmstat from exiting if it can't get the addresses
of these time values it often doesn't need (eg, running kernels
use the sysctl method), which has cropped up recently wit the
removal of boottime variable.
a slighly modified version of this patch (modified to handle
the old boottime variable over the new one) works against a
netbsd-9 vmstat in -current too.
XXX: pullup