diff options
author | kmacy <kmacy@FreeBSD.org> | 2006-12-12 03:50:06 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2006-12-12 03:50:06 +0000 |
commit | c75a3f1632f68021e1f0c1f2ff7b596324d1e55c (patch) | |
tree | cdd2c9aa372e9a6864686e092d8c168e7a8def02 /sys/sun4v | |
parent | d4da9a4a1884f9bcb972d9bf232dbe60f79fe780 (diff) | |
download | FreeBSD-src-c75a3f1632f68021e1f0c1f2ff7b596324d1e55c.zip FreeBSD-src-c75a3f1632f68021e1f0c1f2ff7b596324d1e55c.tar.gz |
workaround kernel malloc's brittleness
- don't shuffle phys_avail following kernel to the beginning if the
range is less than what would remain in a 256MB page (248MB)
Diffstat (limited to 'sys/sun4v')
-rw-r--r-- | sys/sun4v/sun4v/pmap.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/sun4v/sun4v/pmap.c b/sys/sun4v/sun4v/pmap.c index 224221b..0f6847b 100644 --- a/sys/sun4v/sun4v/pmap.c +++ b/sys/sun4v/sun4v/pmap.c @@ -654,14 +654,21 @@ pmap_bootstrap(vm_offset_t ekva) for (j = 0; phys_avail[j] != 0; j += 2) if (nucleus_memory_start < phys_avail[j]) break; + /* + * Don't shuffle unless we have a full 256M page in the range + * our kernel malloc appears to be horribly brittle + */ + if ((phys_avail[j + 1] - phys_avail[j]) < PAGE_SIZE_4M*62) + goto skipshuffle; + for (i = j, k = 0; phys_avail[i] != 0; k++, i++) tmp_phys_avail[k] = phys_avail[i]; for (i = 0; i < j; i++) tmp_phys_avail[k + i] = phys_avail[i]; for (i = 0; i < 128; i++) phys_avail[i] = tmp_phys_avail[i]; - +skipshuffle: for (i = 0; real_phys_avail[i] != 0; i += 2) if (pmap_debug_range || pmap_debug) printf("real_phys_avail[%d]=0x%lx real_phys_avail[%d]=0x%lx\n", |