#
748d5a7e |
| 14-Jun-2020 |
ad <ad@NetBSD.org> |
Remove PG_ZERO. It worked brilliantly on x86 machines from the mid-90s but having spent an age experimenting with it over the last 6 months on various machines and with different use cases it's alwa
Remove PG_ZERO. It worked brilliantly on x86 machines from the mid-90s but having spent an age experimenting with it over the last 6 months on various machines and with different use cases it's always either break-even or a slight net loss for me.
show more ...
|
#
ba90a6ba |
| 11-Jun-2020 |
ad <ad@NetBSD.org> |
Counter tweaks:
- Don't need to count anonpages+filepages any more; clean+unknown+dirty for each kind of page can be summed to get the totals.
- Track the number of free pages with a counter so t
Counter tweaks:
- Don't need to count anonpages+filepages any more; clean+unknown+dirty for each kind of page can be summed to get the totals.
- Track the number of free pages with a counter so that it's one less thing for the allocator to do, which opens up further options there.
- Remove cpu_count_sync_one(). It has no users and doesn't save a whole lot. For the cheap option, give cpu_count_sync() a boolean parameter indicating that a cached value is okay, and rate limit the updates for cached values to hz.
show more ...
|
#
4b8a875a |
| 11-Jun-2020 |
ad <ad@NetBSD.org> |
uvm_availmem(): give it a boolean argument to specify whether a recent cached value will do, or if the very latest total must be fetched. It can be called thousands of times a second and fetching th
uvm_availmem(): give it a boolean argument to specify whether a recent cached value will do, or if the very latest total must be fetched. It can be called thousands of times a second and fetching the totals impacts not only the calling LWP but other CPUs doing unrelated activity in the VM system.
show more ...
|
#
0eaaa024 |
| 23-May-2020 |
ad <ad@NetBSD.org> |
Move proc_lock into the data segment. It was dynamically allocated because at the time we had mutex_obj_alloc() but not __cacheline_aligned.
|
#
1d7848ad |
| 22-Mar-2020 |
ad <ad@NetBSD.org> |
Process concurrent page faults on individual uvm_objects / vm_amaps in parallel, where the relevant pages are already in-core. Proposed on tech-kern.
Temporarily disabled on MP architectures with _
Process concurrent page faults on individual uvm_objects / vm_amaps in parallel, where the relevant pages are already in-core. Proposed on tech-kern.
Temporarily disabled on MP architectures with __HAVE_UNLOCKED_PMAP until adjustments are made to their pmaps.
show more ...
|
#
d305fcb5 |
| 19-Mar-2020 |
ad <ad@NetBSD.org> |
sysctl_vm_uvmexp2(): some counters were needlessly truncated.
|
#
05a3457e |
| 15-Jan-2020 |
ad <ad@NetBSD.org> |
Merge from yamt-pagecache (after much testing):
- Reduce unnecessary page scan in putpages esp. when an object has a ton of pages cached but only a few of them are dirty.
- Reduce the number of p
Merge from yamt-pagecache (after much testing):
- Reduce unnecessary page scan in putpages esp. when an object has a ton of pages cached but only a few of them are dirty.
- Reduce the number of pmap operations by tracking page dirtiness more precisely in uvm layer.
show more ...
|
#
5c06357c |
| 31-Dec-2019 |
ad <ad@NetBSD.org> |
Rename uvm_free() -> uvm_availmem().
|
#
92ec96a5 |
| 21-Dec-2019 |
ad <ad@NetBSD.org> |
Counter tweaks:
"zeroaborts" + "free" don't need to be per-CPU counters, and "bucketmiss" wasn't used. Remove those and cluster by usage.
|
#
ddd3a0be |
| 21-Dec-2019 |
ad <ad@NetBSD.org> |
uvmexp.free -> uvm_free()
|
#
a98966d3 |
| 16-Dec-2019 |
ad <ad@NetBSD.org> |
- Extend the per-CPU counters matt@ did to include all of the hot counters in UVM, excluding uvmexp.free, which needs special treatment and will be done with a separate commit. Cuts system time
- Extend the per-CPU counters matt@ did to include all of the hot counters 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).
show more ...
|
#
a6798213 |
| 07-Jan-2019 |
jdolecek <jdolecek@NetBSD.org> |
add sysctl to easily set ubc_direct
PR kern/53124
|
#
d1579b2d |
| 03-Sep-2018 |
riastradh <riastradh@NetBSD.org> |
Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a n
Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended.
HOWEVER! Some subsystems have
#define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation.
To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it.
I have left a handful of bootloaders that are too annoying to compile-test, and some dead code:
cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4))
It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them.
Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
show more ...
|
#
277fd3d5 |
| 02-Dec-2017 |
mrg <mrg@NetBSD.org> |
add two new members to uvmexp_sysctl{}: bootpages and poolpages. bootpages is set to the pages allocated via uvm_pageboot_alloc(). poolpages is calculated from the list of pools nr_pages members.
t
add two new members to uvmexp_sysctl{}: bootpages and poolpages. bootpages is set to the pages allocated via uvm_pageboot_alloc(). poolpages is calculated from the list of pools nr_pages members.
this brings us closer to having a valid total of pages known by the system, vs actual pages originally managed.
XXX: poolpages needs some handling for PR_RECURSIVE pools still.
show more ...
|
#
5f391f4a |
| 02-Jul-2017 |
joerg <joerg@NetBSD.org> |
Export the guard size of the main thread via vm.guard_size. Add a complementary writable sysctl for the initial guard size of threads created via pthread_create. Let the existing attribut accessors d
Export the guard size of the main thread via vm.guard_size. Add a complementary writable sysctl for the initial guard size of threads created via pthread_create. Let the existing attribut accessors do the right thing. Raise the default guard size for threads to 64KB.
show more ...
|
#
db917302 |
| 01-Dec-2014 |
msaitoh <msaitoh@NetBSD.org> |
Sort in uvmexp_sysctl's order for readability. No functional change.
|
#
571ed845 |
| 01-Dec-2014 |
msaitoh <msaitoh@NetBSD.org> |
Fix a bug that "vmstat -s" print uvmexp.ncolors incorrectly.
|
#
87d65da0 |
| 26-Feb-2014 |
martin <martin@NetBSD.org> |
Fix copy & pasto
|
#
b007730c |
| 26-Feb-2014 |
matt <matt@NetBSD.org> |
Add vm.min_address and vm.max_address which return VM_MIN_ADDRESS and VM_MAXUSER_ADDRESS.
|
#
4f6fb3bf |
| 25-Feb-2014 |
pooka <pooka@NetBSD.org> |
Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before the sysctl link sets are processed, and remove redundancy.
Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicat
Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before the sysctl link sets are processed, and remove redundancy.
Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate lines of code.
show more ...
|
#
e21a34c2 |
| 02-Jun-2012 |
dsl <dsl@NetBSD.org> |
Add some pre-processor magic to verify that the type of the data item passed to sysctl_createv() actually matches the declared type for the item itself. In the places where the caller specifies a
Add some pre-processor magic to verify that the type of the data item passed to sysctl_createv() actually matches the declared type for the item itself. In the places where the caller specifies a function and a structure address (typically the 'softc') an explicit (void *) cast is now needed. Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting AcpiGbl_EnableAmlDebugObject. (mostly passing the address of a uint64_t when typed as CTLTYPE_INT). I've test built quite a few kernels, but there may be some unfixed MD fallout. Most likely passing &char[] to char *. Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.
show more ...
|
#
e62ee4d4 |
| 27-Jan-2012 |
para <para@NetBSD.org> |
extending vmem(9) to be able to allocated resources for it's own needs. simplifying uvm_map handling (no special kernel entries anymore no relocking) make malloc(9) a thin wrapper around kmem(9) (wit
extending vmem(9) to be able to allocated resources for it's own needs. simplifying uvm_map handling (no special kernel entries anymore no relocking) make malloc(9) a thin wrapper around kmem(9) (with private interface for interrupt safety reasons)
releng@ acknowledged
show more ...
|
#
4df396b6 |
| 30-Dec-2011 |
christos <christos@NetBSD.org> |
prevent kernel from writing more than userland passed.
|
#
cff1dac3 |
| 13-Nov-2011 |
christos <christos@NetBSD.org> |
if you are going to dereference a variable, check the variable itself, not it cousin.
|
#
40ec801a |
| 02-Feb-2011 |
chuck <chuck@NetBSD.org> |
udpate license clauses on my code to match the new-style BSD licenses. based on second diff that rmind@ sent me.
no functional change with this commit.
|