diff options
author | Matt Macy <mmacy@FreeBSD.org> | 2018-07-06 02:06:03 +0000 |
---|---|---|
committer | Matt Macy <mmacy@FreeBSD.org> | 2018-07-06 02:06:03 +0000 |
commit | ab3059a8e7f382cff93dbe4d1b082adf62f4d849 (patch) | |
tree | 07b63f9da9282cc1b73ec6d51ce3988dbc08875f /sys/vm/uma.h | |
parent | 88171893e296f0c142cc7ee55db6244d2f6e76be (diff) | |
download | src-ab3059a8e7f382cff93dbe4d1b082adf62f4d849.tar.gz src-ab3059a8e7f382cff93dbe4d1b082adf62f4d849.zip |
Back pcpu zone with domain correct pages
- Change pcpu zone consumers to use a stride size of PAGE_SIZE.
(defined as UMA_PCPU_ALLOC_SIZE to make future identification easier)
- Allocate page from the correct domain for a given cpu.
- Don't initialize pc_domain to non-zero value if NUMA is not defined
There are some misconceptions surrounding this field. It is the
_VM_ NUMA domain and should only ever correspond to valid domain
values as understood by the VM.
The former slab size of sizeof(struct pcpu) was somewhat arbitrary.
The new value is PAGE_SIZE because that's the smallest granularity
which the VM can allocate a slab for a given domain. If you have
fewer than PAGE_SIZE/8 counters on your system there will be some
memory wasted, but this is obviously something where you want the
cache line to be coming from the correct domain.
Reviewed by: jeff
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D15933
Notes
Notes:
svn path=/head/; revision=336020
Diffstat (limited to 'sys/vm/uma.h')
-rw-r--r-- | sys/vm/uma.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/vm/uma.h b/sys/vm/uma.h index ed33ae030728..87ace146bad2 100644 --- a/sys/vm/uma.h +++ b/sys/vm/uma.h @@ -279,8 +279,7 @@ uma_zone_t uma_zcache_create(char *name, int size, uma_ctor ctor, uma_dtor dtor, * mini-dumps. */ #define UMA_ZONE_PCPU 0x8000 /* - * Allocates mp_maxid + 1 slabs sized to - * sizeof(struct pcpu). + * Allocates mp_maxid + 1 slabs of PAGE_SIZE */ #define UMA_ZONE_NUMA 0x10000 /* * NUMA aware Zone. Implements a best |