Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144837889
D18853.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D18853.id.diff
View Options
Index: head/sys/vm/vm_phys.h
===================================================================
--- head/sys/vm/vm_phys.h
+++ head/sys/vm/vm_phys.h
@@ -42,6 +42,10 @@
#ifdef _KERNEL
+#ifndef VM_NFREEORDER_MAX
+#define VM_NFREEORDER_MAX VM_NFREEORDER
+#endif
+
/* Domains must be dense (non-sparse) and zero-based. */
struct mem_affinity {
vm_paddr_t start;
@@ -63,7 +67,7 @@
vm_paddr_t end;
vm_page_t first_page;
int domain;
- struct vm_freelist (*free_queues)[VM_NFREEPOOL][VM_NFREEORDER];
+ struct vm_freelist (*free_queues)[VM_NFREEPOOL][VM_NFREEORDER_MAX];
};
extern struct vm_phys_seg vm_phys_segs[];
Index: head/sys/vm/vm_phys.c
===================================================================
--- head/sys/vm/vm_phys.c
+++ head/sys/vm/vm_phys.c
@@ -106,7 +106,8 @@
MALLOC_DEFINE(M_FICT_PAGES, "vm_fictitious", "Fictitious VM pages");
static struct vm_freelist __aligned(CACHE_LINE_SIZE)
- vm_phys_free_queues[MAXMEMDOM][VM_NFREELIST][VM_NFREEPOOL][VM_NFREEORDER];
+ vm_phys_free_queues[MAXMEMDOM][VM_NFREELIST][VM_NFREEPOOL]
+ [VM_NFREEORDER_MAX];
static int __read_mostly vm_nfreelists;
Index: head/sys/vm/vm_reserv.c
===================================================================
--- head/sys/vm/vm_reserv.c
+++ head/sys/vm/vm_reserv.c
@@ -77,10 +77,15 @@
#if VM_NRESERVLEVEL > 0
+#ifndef VM_LEVEL_0_ORDER_MAX
+#define VM_LEVEL_0_ORDER_MAX VM_LEVEL_0_ORDER
+#endif
+
/*
* The number of small pages that are contained in a level 0 reservation
*/
#define VM_LEVEL_0_NPAGES (1 << VM_LEVEL_0_ORDER)
+#define VM_LEVEL_0_NPAGES_MAX (1 << VM_LEVEL_0_ORDER_MAX)
/*
* The number of bits by which a physical address is shifted to obtain the
@@ -114,6 +119,7 @@
* The number of population map entries in a reservation
*/
#define NPOPMAP howmany(VM_LEVEL_0_NPAGES, NBPOPMAP)
+#define NPOPMAP_MAX howmany(VM_LEVEL_0_NPAGES_MAX, NBPOPMAP)
/*
* Number of elapsed ticks before we update the LRU queue position. Used
@@ -191,7 +197,7 @@
uint16_t popcnt; /* (r) # of pages in use */
int lasttick; /* (r) last pop update tick. */
char inpartpopq; /* (d) */
- popmap_t popmap[NPOPMAP]; /* (r) bit vector, used pages */
+ popmap_t popmap[NPOPMAP_MAX]; /* (r) bit vector, used pages */
};
#define vm_reserv_lockptr(rv) (&(rv)->lock)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 14, 6:40 AM (1 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28691149
Default Alt Text
D18853.id.diff (2 KB)
Attached To
Mode
D18853: MI VM: Make it possible to set size of superpage at boot instead of compile time.
Attached
Detach File
Event Timeline
Log In to Comment