Page MenuHomeFreeBSD

D24102.id69604.diff
No OneTemporary

D24102.id69604.diff

Index: sys/powerpc/aim/mmu_oea64.c
===================================================================
--- sys/powerpc/aim/mmu_oea64.c
+++ sys/powerpc/aim/mmu_oea64.c
@@ -184,10 +184,11 @@
static struct pvo_entry *moea64_bpvo_pool;
static int moea64_bpvo_pool_index = 0;
-static int moea64_bpvo_pool_size = 327680;
+static int moea64_bpvo_pool_size = 0;
SYSCTL_INT(_machdep, OID_AUTO, moea64_allocated_bpvo_entries, CTLFLAG_RD,
&moea64_bpvo_pool_index, 0, "");
+#define BPVO_POOL_EXPANSION_FACTOR 3
#define VSID_NBPW (sizeof(u_int32_t) * 8)
#ifdef __powerpc64__
#define NVSIDS (NPMAPS * 16)
@@ -916,6 +917,11 @@
* Initialise the bootstrap pvo pool.
*/
TUNABLE_INT_FETCH("machdep.moea64_bpvo_pool_size", &moea64_bpvo_pool_size);
+ if (!moea64_bpvo_pool_size) {
+ moea64_bpvo_pool_size = ((ptoa((uintmax_t)physmem) * sizeof(struct vm_page))
+ / (PAGE_SIZE * PAGE_SIZE)) * BPVO_POOL_EXPANSION_FACTOR;
+ }
+
moea64_bpvo_pool = (struct pvo_entry *)moea64_bootstrap_alloc(
moea64_bpvo_pool_size*sizeof(struct pvo_entry), PAGE_SIZE);
moea64_bpvo_pool_index = 0;

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 1, 9:34 AM (20 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29107886
Default Alt Text
D24102.id69604.diff (1 KB)

Event Timeline