freebsd-skq/lib/libmemstat
glebius f1a8621cf2 o Move zone limit from keg level up to zone level. This means that now
two zones sharing a keg may have different limits. Now this is going
  to work:

  zone = uma_zcreate();
  uma_zone_set_max(zone, limit);
  zone2 = uma_zsecond_create(zone);
  uma_zone_set_max(zone2, limit2);

  Kegs no longer have uk_maxpages field, but zones have uz_items. When
  set, it may be rounded up to minimum possible CPU bucket cache size.
  For small limits bucket cache can also be reconfigured to be smaller.
  Counter uz_items is updated whenever items transition from keg to a
  bucket cache or directly to a consumer. If zone has uz_maxitems set and
  it is reached, then we are going to sleep.

o Since new limits don't play well with multi-keg zones, remove them. The
  idea of multi-keg zones was introduced exactly 10 years ago, and never
  have had a practical usage. In discussion with Jeff we came to a wild
  agreement that if we ever want to reintroduce the idea of a smart allocator
  that would be able to choose between two (or more) totally different
  backing stores, that choice should be made one level higher than UMA,
  e.g. in malloc(9) or in mget(), or whatever and choice should be controlled
  by the caller.

o Sleeping code is improved to account number of sleepers and wake them one
  by one, to avoid thundering herd problem.

o Flag UMA_ZONE_NOBUCKETCACHE removed, instead uma_zone_set_maxcache()
  KPI added. Having no bucket cache basically means setting maxcache to 0.

o Now with many fields added and many removed (no multi-keg zones!) make
  sure that struct uma_zone is perfectly aligned.

Reviewed by:	markj, jeff
Tested by:	pho
Differential Revision:	https://reviews.freebsd.org/D17773
2019-01-15 00:02:06 +00:00
..
libmemstat.3
Makefile
Makefile.depend
memstat_all.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
memstat_internal.h lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
memstat_malloc.c libmemstat: adjust for per-cpu stats after r338899 2018-10-11 23:25:14 +00:00
memstat_uma.c o Move zone limit from keg level up to zone level. This means that now 2019-01-15 00:02:06 +00:00
memstat.c Reduce <sys/queue.h> pollution. 2018-05-11 00:01:43 +00:00
memstat.h lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00