diff options
author | John Baldwin <jhb@FreeBSD.org> | 2010-07-27 20:33:50 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2010-07-27 20:33:50 +0000 |
commit | a3870a1826f50ac9d8076f7f21738aa608a916fa (patch) | |
tree | 7e82572d7902fd76fd7aca9ed824e46e66521ec3 /sys/ia64 | |
parent | 257ee8a4254a1ba9ad56cf1debf49d9404df2b16 (diff) | |
download | src-a3870a1826f50ac9d8076f7f21738aa608a916fa.tar.gz src-a3870a1826f50ac9d8076f7f21738aa608a916fa.zip |
Very rough first cut at NUMA support for the physical page allocator. For
now it uses a very dumb first-touch allocation policy. This will change in
the future.
- Each architecture indicates the maximum number of supported memory domains
via a new VM_NDOMAIN parameter in <machine/vmparam.h>.
- Each cpu now has a PCPU_GET(domain) member to indicate the memory domain
a CPU belongs to. Domain values are dense and numbered from 0.
- When a platform supports multiple domains, the default freelist
(VM_FREELIST_DEFAULT) is split up into N freelists, one for each domain.
The MD code is required to populate an array of mem_affinity structures.
Each entry in the array defines a range of memory (start and end) and a
domain for the range. Multiple entries may be present for a single
domain. The list is terminated by an entry where all fields are zero.
This array of structures is used to split up phys_avail[] regions that
fall in VM_FREELIST_DEFAULT into per-domain freelists.
- Each memory domain has a separate lookup-array of freelists that is
used when fulfulling a physical memory allocation. Right now the
per-domain freelists are listed in a round-robin order for each domain.
In the future a table such as the ACPI SLIT table may be used to order
the per-domain lookup lists based on the penalty for each memory domain
relative to a specific domain. The lookup lists may be examined via a
new vm.phys.lookup_lists sysctl.
- The first-touch policy is implemented by using PCPU_GET(domain) to
pick a lookup list when allocating memory.
Reviewed by: alc
Notes
Notes:
svn path=/head/; revision=210550
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/include/vmparam.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/ia64/include/vmparam.h b/sys/ia64/include/vmparam.h index 2a0f06162f8c..a827e01379bf 100644 --- a/sys/ia64/include/vmparam.h +++ b/sys/ia64/include/vmparam.h @@ -120,6 +120,13 @@ #define VM_NFREEORDER 16 /* + * Only one memory domain. + */ +#ifndef VM_NDOMAIN +#define VM_NDOMAIN 1 +#endif + +/* * Disable superpage reservations. */ #ifndef VM_NRESERVLEVEL |