| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
Similar commit in main:
(cherry picked from commit fa9896e082a1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow a zone to opt out of cache size management. In particular,
uma_reclaim() and uma_reclaim_domain() will not reclaim any memory from
the zone, nor will uma_timeout() purge cached items if the zone is idle.
This effectively means that the zone consumer has control over when
items are reclaimed from the cache. In particular, uma_zone_reclaim()
will still reclaim cached items from an unmanaged zone.
Reviewed by: hselasky, kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34142
(cherry picked from commit 389a3fa693ef61c35e15b36f042fb24197b7afb1)
|
|
|
|
|
|
|
|
|
|
|
| |
These configuration options were removed in commit dfe13344f557.
Some forthcoming work will update the UMA man page to describe its
current behaviour on NUMA systems.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 39d4ccf82607c99655fda0d76357a7f534fa724f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make it possible to reclaim items from a specific NUMA domain.
- Add uma_zone_reclaim_domain() and uma_reclaim_domain().
- Permit parallel reclamations. Use a counter instead of a flag to
synchronize with zone_dtor().
- Use the zone lock to protect cache_shrink() now that parallel reclaims
can happen.
- Add a sysctl that can be used to trigger reclamation from a specific
domain.
Currently the new KPIs are unused, so there should be no functional
change.
Reviewed by: mav
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29685
(cherry picked from commit aabe13f1450bb4caba66ec2a7a41c0dfefff511d)
|
|
|
|
|
|
|
|
|
|
|
| |
While here also document that for counter_u64_free().
Reviewed by: rpokala@
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D29215
(cherry picked from commit 51dc8e7f688867e73eb7edc6bc65fdc77c9d5fff)
|
|
|
|
|
|
|
|
| |
uma_zone_prealloc -> uma_prealloc. There's no uma_zone_prealloc defined and the
docs for it describe uma_prealloc exactly.
Notes:
svn path=/head/; revision=364424
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These functions were introduced before UMA started ensuring that freed
memory gets placed in domain-local caches. They no longer serve any
purpose since UMA now provides their functionality by default. Remove
them to simplyify the kernel memory allocator interfaces a bit.
Reviewed by: cem, kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25937
Notes:
svn path=/head/; revision=363834
|
|
|
|
|
|
|
|
|
|
|
| |
For now, copy the mbuf allocator.
Reviewed by: jeff, markj (previous version)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D23237
Notes:
svn path=/head/; revision=357547
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Garbage collect UMA_ZONE_PAGEABLE & UMA_ZONE_STATIC.
- Move flag VTOSLAB from public to private.
- Introduce public NOTPAGE flag and make HASH private.
- Introduce public NOTOUCH flag and make OFFPAGE private.
- Update man page.
The net effect of this should be to make the contract with clients more
clear. Clients should choose constraints, UMA will figure out how to
implement them. This also breaks the confusing double meaning of
OFFPAGE.
Reviewed by: jeff, markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D23016
Notes:
svn path=/head/; revision=356534
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In r353734 the use of the page caches was limited to systems with a
relatively large amount of RAM per CPU. This was to mitigate some
issues reported with the system not able to keep up with memory pressure
in cases where it had been able to do so prior to the addition of the
direct free pool cache. This change re-enables those caches.
The change modifies uma_zone_set_maxcache(), which was introduced
specifically for the page cache zones. Rather than using it to limit
only the full bucket cache, have it also set uz_count_max to provide an
upper bound on the per-CPU cache size that is consistent with the number
of items requested. Remove its return value since it has no use.
Enable the page cache zones unconditionally, and limit them to 0.1% of
the domain's pages. The limit can be overridden by the
vm.pgcache_zone_max tunable as before.
Change the item size parameter passed to uma_zcache_create() to the
correct size, and stop setting UMA_ZONE_MAXBUCKET. This allows the page
cache buckets to be adaptively sized, like the rest of UMA's caches.
This also causes the initial bucket size to be small, so only systems
which benefit from large caches will get them.
Reviewed by: gallatin, jeff
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22393
Notes:
svn path=/head/; revision=355002
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The page daemon periodically invokes uma_reclaim() to reclaim cached
items from each zone when the system is under memory pressure. This
is important since the size of these caches is unbounded by default.
However it also results in bursts of high latency when allocating from
heavily used zones as threads miss in the per-CPU caches and must
access the keg in order to allocate new items.
With r340405 we maintain an estimate of each zone's usage of its
(per-NUMA domain) cache of full buckets. Start making use of this
estimate to avoid reclaiming the entire cache when under memory
pressure. In particular, introduce TRIM, DRAIN and DRAIN_CPU
verbs for uma_reclaim() and uma_zone_reclaim(). When trimming, only
items in excess of the estimate are reclaimed. Draining a zone
reclaims all of the cached full buckets (the previous behaviour of
uma_reclaim()), and may further drain the per-CPU caches in extreme
cases.
Now, when under memory pressure, the page daemon will trim zones
rather than draining them. As a result, heavily used zones do not incur
bursts of bucket cache misses following reclamation, but large, unused
caches will be reclaimed as before.
Reviewed by: jeff
Tested by: pho (an earlier version)
MFC after: 2 months
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D16667
Notes:
svn path=/head/; revision=351673
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Fix warnings from igor and mandoc.
- Provide a brief description of the separation between zones and their
backend slab allocators.
- Document cache zones and secondary zones.
- Document the kernel config options added in r350659.
- Document the uma_zalloc_pcpu() and uma_zfree_pcpu() wrappers.
- Document uma_zone_reserve(), uma_zone_reserve_kva() and
uma_zone_prealloc().
- Document uma_zone_alloc() and uma_zone_freef().
- Add some missing MLINKs and Xrefs.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=351628
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most kernel memory that is allocated after boot does not need to be
executable. There are a few exceptions. For example, kernel modules
do need executable memory, but they don't use UMA or malloc(9). The
BPF JIT compiler also needs executable memory and did use malloc(9)
until r317072.
(Note that a side effect of r316767 was that the "small allocation"
path in UMA on amd64 already returned non-executable memory. This
meant that some calls to malloc(9) or the UMA zone(9) allocator could
return executable memory, while others could return non-executable
memory. This change makes the behavior consistent.)
This change makes malloc(9) return non-executable memory unless the new
M_EXEC flag is specified. After this change, the UMA zone(9) allocator
will always return non-executable memory, and a KASSERT will catch
attempts to use the M_EXEC flag to allocate executable memory using
uma_zalloc() or its variants.
Allocations that do need executable memory have various choices. They
may use the M_EXEC flag to malloc(9), or they may use a different VM
interfact to obtain executable pages.
Now that malloc(9) again allows executable allocations, this change also
reverts most of r317072.
PR: 228927
Reviewed by: alc, kib, markj, jhb (previous version)
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D15691
Notes:
svn path=/head/; revision=335068
|
|
|
|
|
|
|
| |
Sponsored by: Netflix, Dell/EMC Isilon
Notes:
svn path=/head/; revision=331508
|
|
|
|
|
|
|
| |
MFC after: 2 weeks
Notes:
svn path=/head/; revision=331094
|
|
|
|
|
|
|
|
|
| |
PR: 209715
Submitted by: Fabian Keil <fk fabiankeil.de>
MFC after: 3 days
Notes:
svn path=/head/; revision=317444
|
|
|
|
|
|
|
| |
MFC after: 1 month
Notes:
svn path=/head/; revision=301590
|
|
|
|
|
|
|
|
|
| |
additional misspellings detected by igor.
MFC after: 1 week
Notes:
svn path=/head/; revision=298904
|
|
|
|
| |
Notes:
svn path=/head/; revision=294114
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
exhausted.
It is possible for a bug in the code (or, theoretically, even unusual
network conditions) to exhaust all possible mbufs or mbuf clusters.
When this occurs, things can grind to a halt fairly quickly. However,
we currently do not call mb_reclaim() unless the entire system is
experiencing a low-memory condition.
While it is best to try to prevent exhaustion of one of the mbuf zones,
it would also be useful to have a mechanism to attempt to recover from
these situations by freeing "expendable" mbufs.
This patch makes two changes:
a) The patch adds a generic API to the UMA zone allocator to set a
function that should be called when an allocation fails because the
zone limit has been reached. Because of the way this function can be
called, it really should do minimal work.
b) The patch uses this API to try to free mbufs when an allocation
fails from one of the mbuf zones because the zone limit has been
reached. The function schedules a callout to run mb_reclaim().
Differential Revision: https://reviews.freebsd.org/D3864
Reviewed by: gnn
Comments by: rrs, glebius
MFC after: 2 weeks
Sponsored by: Juniper Networks
Notes:
svn path=/head/; revision=292484
|
|
|
|
|
|
|
| |
Found with: mandoc -Tlint
Notes:
svn path=/head/; revision=275993
|
|
|
|
|
|
|
|
| |
PR: 191174
Submitted by: Franco Fichtner <franco at lastsummer.de>
Notes:
svn path=/head/; revision=267936
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
current usage via sysctl(9):
SYSCTL_UMA_MAX()
SYSCTL_ADD_UMA_MAX()
SYSCTL_UMA_CUR()
SYSCTL_ADD_UMA_CUR()
Sponsored by: Nginx, Inc.
Notes:
svn path=/head/; revision=261593
|
|
|
|
| |
Notes:
svn path=/head/; revision=249373
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These zones have slab size == sizeof(struct pcpu), but request from VM
enough pages to fit (uk_slabsize * mp_ncpus). An item allocated from such
zone would have a separate twin for each CPU in the system, and these twins
are at a distance of sizeof(struct pcpu) from each other. This magic value
of distance would allow us to make some optimizations later.
To address private item from a CPU simple arithmetics should be used:
item = (type *)((char *)base + sizeof(struct pcpu) * curcpu)
These arithmetics are available as zpcpu_get() macro in pcpu.h.
To introduce non-page size slabs a new field had been added to uma_keg
uk_slabsize. This shifted some frequently used fields of uma_keg to the
fourth cache line on amd64. To mitigate this pessimization, uma_keg fields
were a bit rearranged and least frequently used uk_name and uk_link moved
down to the fourth cache line. All other fields, that are dereferenced
frequently fit into first three cache lines.
Sponsored by: Nginx, Inc.
Notes:
svn path=/head/; revision=249264
|
|
|
|
|
|
|
|
| |
only those that at least are used in the kernel, or that definitely
work.
Notes:
svn path=/head/; revision=248588
|
|
|
|
| |
Notes:
svn path=/head/; revision=248586
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
will be printed once the given zone becomes full and cannot allocate an
item. The warning will not be printed more often than every five minutes.
All UMA warnings can be globally turned off by setting sysctl/tunable
vm.zone_warnings to 0.
Discussed on: arch
Obtained from: WHEEL Systems
MFC after: 2 weeks
Notes:
svn path=/head/; revision=243998
|
|
|
|
| |
Notes:
svn path=/head/; revision=242270
|
|
|
|
|
|
|
|
|
| |
Submitted by: amdmi3
PR: 165431
MFC after: 1 week
Notes:
svn path=/head/; revision=232157
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The reasoning behind this, is that if we are consistent in our
documentation about the uint*_t stuff, people will be less tempted to
write new code that uses the non-standard types.
I am not going to bump the man page dates, as these changes can be
considered style nits. The meaning of the man pages is unaffected.
MFC after: 1 month
Notes:
svn path=/head/; revision=231564
|
|
|
|
| |
Notes:
svn path=/head/; revision=222176
|
|
|
|
|
|
|
|
| |
Noticed by: Ron Steinke <rsteinke at isilon dot com>
MFC after: 3 days
Notes:
svn path=/head/; revision=214062
|
|
|
|
|
|
|
|
|
|
|
| |
rounding. The same value can also be obtained with uma_zone_get_max, but this
change avoids a caller having to make two back-to-back calls.
Sponsored by: FreeBSD Foundation
Reviewed by: gnn, jhb
Notes:
svn path=/head/; revision=213911
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add uma_zone_get_cur which returns the current approximate occupancy of
a zone. This is useful for providing stats via sysctl amongst other things.
Sponsored by: FreeBSD Foundation
Reviewed by: gnn, jhb
MFC after: 2 weeks
Notes:
svn path=/head/; revision=213910
|
|
|
|
|
|
|
|
|
| |
PR: docs/120357
Submitted by: gahr
MFC after: 3 days
Notes:
svn path=/head/; revision=179880
|
|
|
|
| |
Notes:
svn path=/head/; revision=163577
|
|
|
|
|
|
|
|
|
| |
OKed by: rwatson, tegge
Approved by: pjd (mentor)
MFC after: 1 week
Notes:
svn path=/head/; revision=162946
|
|
|
|
|
|
|
|
| |
man pages (though not from copyright notices). While I'm here, add email
addresses where appropriate.
Notes:
svn path=/head/; revision=124963
|
|
|
|
|
|
|
| |
Reviewed by: bmilekic
Notes:
svn path=/head/; revision=117836
|
|
|
|
|
|
|
|
|
|
|
| |
Add devfs(5) reference - make_dev.9
Change .Xr from VFS_VGET(9) to vget(9) - vnode.9
Spelling fix, 'useage' to 'usage' - zone.9
Approved by: des (mentor)
Notes:
svn path=/head/; revision=115441
|
|
|
|
|
|
|
| |
Approved by: re
Notes:
svn path=/head/; revision=107383
|
|
|
|
|
|
|
| |
a bit. As there may be changes soon we're still a bit vague unfortunatly.
Notes:
svn path=/head/; revision=107032
|
|
|
|
| |
Notes:
svn path=/head/; revision=97578
|
|
|
|
|
|
|
| |
Submitted by: arr
Notes:
svn path=/head/; revision=96852
|
|
|
|
|
|
|
|
|
| |
the normal malloc(9) flags.
Submitted by: arr
Notes:
svn path=/head/; revision=95805
|
|
|
|
| |
Notes:
svn path=/head/; revision=95802
|
|
|
|
|
|
|
| |
Show Jeff's work and your's truly manual page updates.
Notes:
svn path=/head/; revision=95800
|
|
|
|
| |
Notes:
svn path=/head/; revision=95798
|
|
|
|
| |
Notes:
svn path=/head/; revision=95796
|