aboutsummaryrefslogtreecommitdiff
path: root/sys/arm64
diff options
context:
space:
mode:
authorMatt Macy <mmacy@FreeBSD.org>2018-07-06 02:06:03 +0000
committerMatt Macy <mmacy@FreeBSD.org>2018-07-06 02:06:03 +0000
commitab3059a8e7f382cff93dbe4d1b082adf62f4d849 (patch)
tree07b63f9da9282cc1b73ec6d51ce3988dbc08875f /sys/arm64
parent88171893e296f0c142cc7ee55db6244d2f6e76be (diff)
downloadsrc-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/arm64')
-rw-r--r--sys/arm64/include/counter.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arm64/include/counter.h b/sys/arm64/include/counter.h
index 18b6606566d0..eb26fa952273 100644
--- a/sys/arm64/include/counter.h
+++ b/sys/arm64/include/counter.h
@@ -44,7 +44,7 @@ static inline uint64_t
counter_u64_read_one(uint64_t *p, int cpu)
{
- return (*(uint64_t *)((char *)p + sizeof(struct pcpu) * cpu));
+ return (*(uint64_t *)((char *)p + UMA_PCPU_ALLOC_SIZE * cpu));
}
static inline uint64_t
@@ -64,7 +64,7 @@ static void
counter_u64_zero_one_cpu(void *arg)
{
- *((uint64_t *)((char *)arg + sizeof(struct pcpu) *
+ *((uint64_t *)((char *)arg + UMA_PCPU_ALLOC_SIZE *
PCPU_GET(cpuid))) = 0;
}