summaryrefslogtreecommitdiffstats
path: root/lib/libmemstat
Commit message (Collapse)AuthorAgeFilesLines
* MFHgjb2016-02-101-1/+0
|\ | | | | | | Sponsored by: The FreeBSD Foundation
| * Include sys/_task.h into uma_int.h, so that taskqueue.h isn't aglebius2016-02-091-1/+0
| | | | | | | | | | | | requirement for uma_int.h. Suggested by: jhb
* | MFHgjb2016-02-081-0/+1
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * Fix build.glebius2016-02-041-0/+1
| |
* | First pass through library packaging.gjb2016-02-041-0/+1
|/ | | | Sponsored by: The FreeBSD Foundation
* META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host.bdrewery2015-11-251-1/+0
| | | | | | | | This both avoids some dependencies on xinstall.host and allows bootstrapping on older releases to work due to lack of at least 'install -l' support. Sponsored by: EMC / Isilon Storage Division
* Add META_MODE support.sjg2015-06-131-0/+20
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-271-2/+1
| |\ | |/ |/|
| * Merge head from 7/28sjg2014-08-191-1/+1
| |\
| * | Updated dependenciessjg2014-05-161-1/+1
| | |
| * | Updated dependenciessjg2014-05-101-0/+2
| | |
| * | Merge headsjg2014-04-275-1/+19
| |\ \
| * \ \ Merge from headsjg2013-09-051-1/+1
| |\ \ \
| * | | | Updated dependenciessjg2013-03-111-0/+1
| | | | |
| * | | | Updated dependenciessjg2013-02-161-2/+0
| | | | |
| * | | | Updated/new Makefile.dependsjg2012-11-081-0/+3
| | | | |
| | | | |
| | \ \ \
| *-. \ \ \ Sync from headsjg2012-11-041-1/+1
| |\ \ \ \ \
| * | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+17
| | |/ / / / | |/| | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | Convert libraries to use LIBADDbapt2014-11-251-2/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | While here reduce a bit overlinking
* | | | | use .Mt to mark up email addresses consistently (part3)bapt2014-06-231-1/+1
| |_|_|/ |/| | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de>
* | | | Expose real size of UMA allocations via libmemstat(3).glebius2014-02-105-1/+19
| |_|/ |/| | | | | | | | Sponsored by: Nginx, Inc.
* | | Refine UMA bucket allocation to reduce space consumption and improvejeff2013-06-181-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | performance. - Always free to the alloc bucket if there is space. This gives LIFO allocation order to improve hot-cache performance. This also allows for zones with a single bucket per-cpu rather than a pair if the entire working set fits in one bucket. - Enable per-cpu caches of buckets. To prevent recursive bucket allocation one bucket zone still has per-cpu caches disabled. - Pick the initial bucket size based on a table driven maximum size per-bucket rather than the number of items per-page. This gives more sane initial sizes. - Only grow the bucket size when we face contention on the zone lock, this causes bucket sizes to grow more slowly. - Adjust the number of items per-bucket to account for the header space. This packs the buckets more efficiently per-page while making them not quite powers of two. - Eliminate the per-zone free bucket list. Always return buckets back to the bucket zone. This ensures that as zones grow into larger bucket sizes they eventually discard the smaller sizes. It persists fewer buckets in the system. The locking is slightly trickier. - Only switch buckets in zalloc, not zfree, this eliminates pathological cases where we ping-pong between two buckets. - Ensure that the thread that fills a new bucket gets to allocate from it to give a better upper bound on allocation time. Sponsored by: EMC / Isilon Storage Division
* | Const-ify the zone name argument to uma_zcreate(9).mdf2012-10-261-1/+1
|/ | | | MFC after: 3 days
* Fix various typos in manual pages.gjb2012-02-251-2/+2
| | | | | | Submitted by: amdmi3 PR: 165431 MFC after: 1 week
* Cosmetic cleanup: remove #define LIBMEMSTAT used to prevent a nestedpluknet2011-09-021-1/+0
| | | | | | | | include of opt_vmpage.h from vm/vm_page.h. opt_vmpage.h was retired before 7.0 together with options PQ_NOOPT. Approved by: re (kib) MFC after: 3 days
* Get rid of MAXCPU knowledge used for internal needs only. Switch topluknet2011-08-016-64/+41
| | | | | | | | | | | dynamic memory allocation to hold per-CPU memory types data (sized to mp_maxid for UMA, and to mp_maxcpus for malloc to match the kernel). That fixes libmemstat with arbitrary large MAXCPU values and therefore eliminates MEMSTAT_ERROR_TOOMANYCPUS error type. Reviewed by: jhb Approved by: re (kib)
* Revert r222363, as bde@ pointed out the initial solution was far moreattilio2011-05-311-1/+1
| | | | correct.
* Style fix: cast to size_t rather than u_long when comparing to sizeof()attilio2011-05-271-1/+1
| | | | | | rets. Requested by: kib
* Sync with -CURRENTattilio2011-05-101-1/+1
|
* Fix a mismerge.attilio2011-05-081-0/+1
|
* Revert MAXCPU introduction. In userland it is always 1.attilio2011-05-085-10/+20
| | | | Noted by: marcel
* Commit the support for removing cpumask_t and replacing it directly withattilio2011-05-051-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cpuset_t objects. That is going to offer the underlying support for a simple bump of MAXCPU and then support for number of cpus > 32 (as it is today). Right now, cpumask_t is an int, 32 bits on all our supported architecture. cpumask_t on the other side is implemented as an array of longs, and easilly extendible by definition. The architectures touched by this commit are the following: - amd64 - i386 - pc98 - arm - ia64 - XEN while the others are still missing. Userland is believed to be fully converted with the changes contained here. Some technical notes: - This commit may be considered an ABI nop for all the architectures different from amd64 and ia64 (and sparc64 in the future) - per-cpu members, which are now converted to cpuset_t, needs to be accessed avoiding migration, because the size of cpuset_t should be considered unknown - size of cpuset_t objects is different from kernel and userland (this is primirally done in order to leave some more space in userland to cope with KBI extensions). If you need to access kernel cpuset_t from the userland please refer to example in this patch on how to do that correctly (kgdb may be a good source, for example). - Support for other architectures is going to be added soon - Only MAXCPU for amd64 is bumped now The patch has been tested by sbruno and Nicholas Esborn on opteron 4 x 12 pack CPUs. More testing on big SMP is expected to came soon. pluknet tested the patch with his 8-ways on both amd64 and i386. Tested by: pluknet, sbruno, gianni, Nicholas Esborn Reviewed by: jeff, jhb, sbruno
* Remove the redefinition of MEMSTAT_MAXCPU and just use MAXCPU for that.attilio2011-05-025-23/+12
| | | | Reviewed by: sbruno
* MFC @ r221286attilio2011-05-011-3/+4
|
* Spelling fixes.joel2010-08-031-2/+2
|
* Add a new column to the output of vmstat -z to indicate the numbersbruno2010-06-154-0/+12
| | | | | | | | | | | | | of times the system was forced to sleep when requesting a new allocation. Expand the debugger hook, db_show_uma, to display these results as well. This has proven to be very useful in out of memory situations when it is not known why systems have become sluggish or fail in odd ways. Reviewed by: rwatson alc Approved by: scottl (mentor) peter Obtained from: Yahoo Inc.
* mdoc: order prologue macros consistently by Dd/Dt/Osuqs2010-04-141-1/+1
| | | | | | | | Although groff_mdoc(7) gives another impression, this is the ordering most widely used and also required by mdocml/mandoc. Reviewed by: ru Approved by: philip, ed (mentors)
* Bump the version of all non-symbol-versioned shared libraries inkensmith2009-07-191-1/+1
| | | | | | | | preparation for 8.0-RELEASE. Add the previous version of those libraries to ObsoleteFiles.inc and bump __FreeBSD_Version. Reviewed by: kib Approved by: re (rwatson)
* Update the KVM backend for malloc stats to catch up to the internal structurejhb2009-05-151-6/+5
| | | | | | BI change from the addition of DTrace malloc(9) probes. Submitted by: Ben Kelly ben of wanderview dot com
* Make pointer argument to kread_string() const since the kernel structurerwatson2007-05-211-3/+4
| | | | | | | field is const, and then employ __DECONST before getting into the kvm code. This eliminates a gcc 4.2 warning about losing constification. __DECONST advice from: sam
* Bump library versions in preparation for 7.0.deischen2007-05-211-1/+1
| | | | Ok'd by: kan
* Fix a comment in memstat.h: errors are associated with memory type lists,rwatson2007-03-151-1/+1
| | | | | | | not individual types. Submitted by: Bryan Venteicher <bryanv at daemoninthecloset dot org> MFC after: 3 days
* Increase the number of CPUs to 32 to suit sun4v.jb2006-07-261-1/+1
| | | | Reviewed by: rwatson@
* Update copyright for 2006.rwatson2006-02-111-1/+1
| | | | MFC after: 3 days
* The uma_zone data structure defines the size of its uz_cpu[] array as 1,rwatson2006-02-111-2/+24
| | | | | | | | | | | | | but then sizes the containing data structure at run-time to make room for per-cpu cache data. Modify libmemstat to separately allocate a buffer to hold per-cpu cache data, sized based on the run-time mp_maxid variable when using libkvm to access UMA data. This avoids reading invalid cache data from beyond the end of the uma_zone data structure on the stack, which can result in invalid statistics and/or reads from invalid kernel addresses. Foot target practice by: ps MFC after: 3 days
* When reporting an error reading from UMA per-cpu cache pointers using KVM,rwatson2006-02-111-4/+2
| | | | | | | | return a KVM error rather than an out of memory error, so that the caller reports the KVM error state. This replaces a misleading error message with a more accurate although equally confusing one. MFC after: 3 days
* Read all_cpus variable out of kmem, and validate CPUs against the all_cpusrwatson2006-02-111-0/+10
| | | | | | | | cpu mask before looking at the cache entries for the CPU. For systems with sparse CPU id arrays, this skips otherwise uninitialized cache structures. MFC after: 3 days
* Correct a typo in the extraction of zone information from UMA using kmem:rwatson2006-02-111-1/+1
| | | | | | bytes = allocated - freed, not bytes = allocated = freed. MFC after: 3 days
* Remove unnecessary and undesirable 'static' from function-local kegrwatson2006-01-161-1/+1
| | | | | | | | list, which could cause problems for multi-threaded applications using libmemstat to monitor UMA in more than one thread simultaneously. MFC after: 3 days
OpenPOWER on IntegriCloud