- amap_adjref_anons() must also ignore AMAP_REFALL when updating
the ppref, not just when deciding whether or not to initialize ppref.
- UVM_EXTRACT_QREF relies on AMAP_REFALL to work properly,
and since we can't use AMAP_REFALL then we can't use QREF either.
This flag tells the amap code that it does not need to allocate ppref
as part of adding or removing a reference, but that is only correct
if the range of the reference being added or removed is the same
as the range of all other references to the amap, and the point of
this flag is exactly to try to optimize the case where the range is
different and thus this flag would not be correct to use.
Fixes PR 55366.
The poorly named uvm.h is generally supposed to be for uvm-internal
users only.
- Narrow it to files that actually need it -- mostly files that need
to query whether curlwp is the pagedaemon, which should maybe be
exposed by an external header.
- Use uvm_extern.h where feasible and uvm_*.h for things not exposed
by it. We should split up uvm_extern.h but this will serve for now
to reduce the uvm.h dependencies.
- Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use
UVMHIST(ubchist), since ubchist is declared in uvm.h but the
reference evaporates if UVMHIST is not defined, so we reduce header
file dependencies.
- Make uvm_device.h and uvm_swap.h independently includable while
here.
ok chs@
but will overflow much slower than the main pmap history.
move various debug info into kernhist. make pte array checker
into an array and use it in pmap_segtab_release() and
pmap_pte_reserve(). move check before MD callback(), incase it
wants to change ptes for some reason (they're passed in, but
this callback is currently always NULL.)
clean up some history logs to reduce the number of lines required.
and use it in pmap_deactivate
Call pmap_md_xtab_{,de}activate from pmap_segtab_{,de}activate to be used
for PMAP_HWPAGEWALKER and any caches ops that might be required.
Provide empty (for now) pmap_md_xtab_{,de}activate functions on the
platforms that use sys/uvm/pmap
aes.h will remain just for key setup; any particular construction using
AES can have its own header file so we can have many of them without
rebuilding everything AES-related whenever one of them changes.
(Planning to add AES-CCM and AES-GCM too.)
tmpfs calls pmap_kenter_pa(9) with virtual address with page offset
Bisectioning revealed that the failure starts with this commit:
sys/fs/tmpfs/tmpfs_vnops.c rev 1.142:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/fs/tmpfs/tmpfs_vnops.c#rev1.142
by which tmpfs became to use UBC_FAULTBUSY flag for ubc_uiomove(9).
If this flag is specified, pmap_kenter_pa(9) is called with virtual
address with page offset via ubc_alloc(9):
https://nxr.netbsd.org/xref/src/sys/uvm/uvm_bio.c#616
Most ports seem to neglect silently page offset of va argument for
pmap_kenter_pa(9). However, it causes KASSERT failure correctly for
powerpc/booke. So, truncate page offset there.
Now, tmpfs works just fine on evbppc-booke, and I've confirmed that
no new failures are detected by ATF.
Discussed with chs@. Thanks!
of (1 << UBC_WINSHIFT, MAX_PAGE_SIZE)
given that default UBC_WINSHIFT is 13, this changes behaviour only
for mips and powerpc (BookE/OEA), which will now have twice as much
memory used for UBC windows; if this ever becomes a problem, it's
possible to reduce ubc_nwins in MD code similar to what is done on sparc
this eliminates variable-length arrays in ubc_fault(),
ubc_uiomove(), and ubc_zerorange() so that the stack usage can be
determined and checked in compile time
in uvm_aio_aiodone() so that the stack usage can be determined and
checked in compile time; this is not called recursively not
particularly deep in call stack, so there is no need to save every
last drop of stack space here