svn commit: r362449 - head/sys/vm
Jeff Roberson
jeff at FreeBSD.org
Sat Jun 20 20:21:05 UTC 2020
Author: jeff
Date: Sat Jun 20 20:21:04 2020
New Revision: 362449
URL: https://svnweb.freebsd.org/changeset/base/362449
Log:
Clarify some language. Favor primary where both master and primary were
used in conjunction with secondary.
Modified:
head/sys/vm/uma.h
head/sys/vm/uma_core.c
head/sys/vm/uma_int.h
Modified: head/sys/vm/uma.h
==============================================================================
--- head/sys/vm/uma.h Sat Jun 20 20:20:16 2020 (r362448)
+++ head/sys/vm/uma.h Sat Jun 20 20:21:04 2020 (r362449)
@@ -197,24 +197,23 @@ uma_zone_t uma_zcreate(const char *name, size_t size,
* ctor/dtor/zinit/zfini may all be null, see notes above.
* Note that the zinit and zfini specified here are NOT
* exactly the same as the init/fini specified to uma_zcreate()
- * when creating a master zone. These zinit/zfini are called
+ * when creating a primary zone. These zinit/zfini are called
* on the TRANSITION from keg to zone (and vice-versa). Once
* these are set, the primary zone may alter its init/fini
* (which are called when the object passes from VM to keg)
* using uma_zone_set_init/fini()) as well as its own
- * zinit/zfini (unset by default for master zone) with
+ * zinit/zfini (unset by default for primary zone) with
* uma_zone_set_zinit/zfini() (note subtle 'z' prefix).
*
- * master A reference to this zone's Master Zone (Primary Zone),
- * which contains the backing Keg for the Secondary Zone
- * being added.
+ * primary A reference to this zone's Primary Zone which contains the
+ * backing Keg for the Secondary Zone being added.
*
* Returns:
* A pointer to a structure which is intended to be opaque to users of
* the interface. The value may be null if the wait flag is not set.
*/
uma_zone_t uma_zsecond_create(const char *name, uma_ctor ctor, uma_dtor dtor,
- uma_init zinit, uma_fini zfini, uma_zone_t master);
+ uma_init zinit, uma_fini zfini, uma_zone_t primary);
/*
* Create cache-only zones.
Modified: head/sys/vm/uma_core.c
==============================================================================
--- head/sys/vm/uma_core.c Sat Jun 20 20:20:16 2020 (r362448)
+++ head/sys/vm/uma_core.c Sat Jun 20 20:21:04 2020 (r362449)
@@ -2197,7 +2197,7 @@ keg_ctor(void *mem, int size, void *udata, int flags)
keg->uk_dr.dr_iter = 0;
/*
- * The master zone is passed to us at keg-creation time.
+ * The primary zone is passed to us at keg-creation time.
*/
zone = arg->zone;
keg->uk_name = zone->uz_name;
@@ -2808,7 +2808,7 @@ uma_startup1(vm_offset_t virtual_avail)
{
struct uma_zctor_args args;
size_t ksize, zsize, size;
- uma_keg_t masterkeg;
+ uma_keg_t primarykeg;
uintptr_t m;
int domain;
uint8_t pflag;
@@ -2838,7 +2838,7 @@ uma_startup1(vm_offset_t virtual_avail)
m += zsize;
kegs = (uma_zone_t)m;
m += zsize;
- masterkeg = (uma_keg_t)m;
+ primarykeg = (uma_keg_t)m;
/* "manually" create the initial zone */
memset(&args, 0, sizeof(args));
@@ -2848,7 +2848,7 @@ uma_startup1(vm_offset_t virtual_avail)
args.dtor = keg_dtor;
args.uminit = zero_init;
args.fini = NULL;
- args.keg = masterkeg;
+ args.keg = primarykeg;
args.align = UMA_SUPER_ALIGN - 1;
args.flags = UMA_ZFLAG_INTERNAL;
zone_ctor(kegs, zsize, &args, M_WAITOK);
@@ -3024,13 +3024,13 @@ uma_zcreate(const char *name, size_t size, uma_ctor ct
/* See uma.h */
uma_zone_t
uma_zsecond_create(const char *name, uma_ctor ctor, uma_dtor dtor,
- uma_init zinit, uma_fini zfini, uma_zone_t master)
+ uma_init zinit, uma_fini zfini, uma_zone_t primary)
{
struct uma_zctor_args args;
uma_keg_t keg;
uma_zone_t res;
- keg = master->uz_keg;
+ keg = primary->uz_keg;
memset(&args, 0, sizeof(args));
args.name = name;
args.size = keg->uk_size;
Modified: head/sys/vm/uma_int.h
==============================================================================
--- head/sys/vm/uma_int.h Sat Jun 20 20:20:16 2020 (r362448)
+++ head/sys/vm/uma_int.h Sat Jun 20 20:21:04 2020 (r362449)
@@ -97,8 +97,8 @@
* safely only from their associated CPU, while the Zones backed by the same
* Keg all share a common Keg lock (to coalesce contention on the backing
* slabs). The backing Keg typically only serves one Zone but in the case of
- * multiple Zones, one of the Zones is considered the Master Zone and all
- * Zone-related stats from the Keg are done in the Master Zone. For an
+ * multiple Zones, one of the Zones is considered the Primary Zone and all
+ * Zone-related stats from the Keg are done in the Primary Zone. For an
* example of a Multi-Zone setup, refer to the Mbuf allocation code.
*/
More information about the svn-src-all
mailing list