<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libmemstat/memstat.c, branch releng/14.3</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-16T17:54:16+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b3e7694832e81d7a904a10f525f8797b753bf0d3'/>
<id>b3e7694832e81d7a904a10f525f8797b753bf0d3</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD</title>
<updated>2023-05-12T16:44:03+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-05-10T15:40:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4d846d260e2b9a3d4d0a701462568268cbfe7a5b'/>
<id>4d846d260e2b9a3d4d0a701462568268cbfe7a5b</id>
<content type='text'>
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>Add two new kernel options to control memory locality on NUMA hardware.</title>
<updated>2019-08-06T21:50:34+00:00</updated>
<author>
<name>Jeff Roberson</name>
<email>jeff@FreeBSD.org</email>
</author>
<published>2019-08-06T21:50:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c16850865572058518fa625359057032563c8baf'/>
<id>c16850865572058518fa625359057032563c8baf</id>
<content type='text'>
 - UMA_XDOMAIN enables an additional per-cpu bucket for freed memory that
   was freed on a different domain from where it was allocated.  This is
   only used for UMA_ZONE_NUMA (first-touch) zones.
 - UMA_FIRSTTOUCH sets the default UMA policy to be first-touch for all
   zones.  This tries to maintain locality for kernel memory.

Reviewed by:	gallatin, alc, kib
Tested by:	pho, gallatin
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D20929
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 - UMA_XDOMAIN enables an additional per-cpu bucket for freed memory that
   was freed on a different domain from where it was allocated.  This is
   only used for UMA_ZONE_NUMA (first-touch) zones.
 - UMA_FIRSTTOUCH sets the default UMA policy to be first-touch for all
   zones.  This tries to maintain locality for kernel memory.

Reviewed by:	gallatin, alc, kib
Tested by:	pho, gallatin
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D20929
</pre>
</div>
</content>
</entry>
<entry>
<title>Reduce &lt;sys/queue.h&gt; pollution.</title>
<updated>2018-05-11T00:01:43+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2018-05-11T00:01:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6bff85ff9a293c67840c40974e821c9fc76bff71'/>
<id>6bff85ff9a293c67840c40974e821c9fc76bff71</id>
<content type='text'>
While &lt;sys/sysctl.h&gt; includes &lt;sys/queue.h&gt; unconditionally, it is only
actually used in code which is conditional on _KERNEL.  Make the #include
itself conditional as well, and fix userland code that uses &lt;sys/queue.h&gt;
for other purposes but relied on &lt;sys/sysctl.h&gt; to bring it in.

MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While &lt;sys/sysctl.h&gt; includes &lt;sys/queue.h&gt; unconditionally, it is only
actually used in code which is conditional on _KERNEL.  Make the #include
itself conditional as well, and fix userland code that uses &lt;sys/queue.h&gt;
for other purposes but relied on &lt;sys/sysctl.h&gt; to bring it in.

MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: further adoption of SPDX licensing ID tags.</title>
<updated>2017-11-26T02:00:33+00:00</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-26T02:00:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5e53a4f90f82c4345f277dd87cc9292f26e04a29'/>
<id>5e53a4f90f82c4345f277dd87cc9292f26e04a29</id>
<content type='text'>
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
</pre>
</div>
</content>
</entry>
<entry>
<title>Expose real size of UMA allocations via libmemstat(3).</title>
<updated>2014-02-10T20:09:10+00:00</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2014-02-10T20:09:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=345e3f4dd764bf848e37ce8df83d9f2a4610c446'/>
<id>345e3f4dd764bf848e37ce8df83d9f2a4610c446</id>
<content type='text'>
Sponsored by:	Nginx, Inc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sponsored by:	Nginx, Inc.
</pre>
</div>
</content>
</entry>
<entry>
<title>Get rid of MAXCPU knowledge used for internal needs only. Switch to</title>
<updated>2011-08-01T09:43:35+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@FreeBSD.org</email>
</author>
<published>2011-08-01T09:43:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1882360b9b0fbd7f4ddcd6fb35674ec309b2a738'/>
<id>1882360b9b0fbd7f4ddcd6fb35674ec309b2a738</id>
<content type='text'>
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)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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)
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a new column to the output of vmstat -z to indicate the number</title>
<updated>2010-06-15T19:28:37+00:00</updated>
<author>
<name>Sean Bruno</name>
<email>sbruno@FreeBSD.org</email>
</author>
<published>2010-06-15T19:28:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bf9659591505fa132580ae8ffb7cabfae6875bda'/>
<id>bf9659591505fa132580ae8ffb7cabfae6875bda</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add memstat_kvm_uma(), an implementation of a libmemstat(3) query routine</title>
<updated>2005-08-01T19:07:39+00:00</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2005-08-01T19:07:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=33c20d188c95e286882b488f032c4d08bd52aca0'/>
<id>33c20d188c95e286882b488f032c4d08bd52aca0</id>
<content type='text'>
that knows how to extract UMA(9) allocator statistics from a core dump or
live memory image using kvm(3).  The caller is expected to provide the
necessary kvm_t handle, which is then used by libmemstat(3).

With these changes, it is trivially straight forward to re-introduce
vmstat -z support on core dumps, which was lost when UMA was introduced.

In the short term, this requires including vm/ include files that are not
intended for extra-kernel use, requiring in turn some ugliness.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
that knows how to extract UMA(9) allocator statistics from a core dump or
live memory image using kvm(3).  The caller is expected to provide the
necessary kvm_t handle, which is then used by libmemstat(3).

With these changes, it is trivially straight forward to re-introduce
vmstat -z support on core dumps, which was lost when UMA was introduced.

In the short term, this requires including vm/ include files that are not
intended for extra-kernel use, requiring in turn some ugliness.
</pre>
</div>
</content>
</entry>
<entry>
<title>Correct two libmemstat(3) bugs:</title>
<updated>2005-08-01T13:18:21+00:00</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2005-08-01T13:18:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=22247a2a387b580ee4ed82cbfc4cbac20f4efe72'/>
<id>22247a2a387b580ee4ed82cbfc4cbac20f4efe72</id>
<content type='text'>
- Move memory_type_list flushing logic from memstat_mtl_free() to
  _memstat_mtl_empty(), a libmemstat-internal function that can
  be called from other parts of the library.  Invoke
  _memstat_mtl_empty() from memstat_mtl_free(), which also frees
  the containing list structure.

  Invoke _memstat_mtl_empty() instead of memstat_mtl_free() in
  various error cases in memstat_malloc.c and memstat_uma.c, which
  previously resulted in the list being freed prematurely.

- Reverse the order of updating the mt_kegfree and mt_free fields
  of the memory_type in memstat_uma.c, otherwise keg free items
  won't be counted properly for non-secondary zones.

MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Move memory_type_list flushing logic from memstat_mtl_free() to
  _memstat_mtl_empty(), a libmemstat-internal function that can
  be called from other parts of the library.  Invoke
  _memstat_mtl_empty() from memstat_mtl_free(), which also frees
  the containing list structure.

  Invoke _memstat_mtl_empty() instead of memstat_mtl_free() in
  various error cases in memstat_malloc.c and memstat_uma.c, which
  previously resulted in the list being freed prematurely.

- Reverse the order of updating the mt_kegfree and mt_free fields
  of the memory_type in memstat_uma.c, otherwise keg free items
  won't be counted properly for non-secondary zones.

MFC after:	3 days
</pre>
</div>
</content>
</entry>
</feed>
