Date: Sun, 8 Jun 2008 12:32:22 +0800 From: "Tz-Huan Huang" <tzhuan@csie.org> To: "Alan Cox" <alc@cs.rice.edu> Cc: hackers@freebsd.org Subject: Re: Increasing KVM on amd64 Message-ID: <6a7033710806072132i5abe2368h3db3ba269951fac5@mail.gmail.com> In-Reply-To: <484B20E7.2040009@cs.rice.edu> References: <484B20E7.2040009@cs.rice.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jun 8, 2008 at 7:59 AM, Alan Cox <alc@cs.rice.edu> wrote: > You can download a patch from > http://www.cs.rice.edu/~alc/amd64_kvm_6GB.patch that increases amd64's > kernel virtual address space to 6GB. This patch also increases the default > for the kmem map to almost 2GB. I believe that kernel loadable modules > still work. However, I suspect that mini-dumps are broken. > > I don't plan on committing this patch in its current form. Some of the > changes are done in a hackish way. I am, however, curious to hear whether > or not it works for you. Thanks for the patch. I applied it on 7-stable but got failed on pmap.c. Patching file amd64/amd64/pmap.c using Plan A... Hunk #1 succeeded at 429 (offset -12 lines). Hunk #2 failed at 442. Hunk #3 succeeded at 1505 (offset -168 lines). Hunk #4 succeeded at 1691 (offset -12 lines). amd64/amd64/pmap.c.rej: *************** *** 442,456 **** /* Map from zero to end of allocations under 2M pages */ /* This replaces some of the KPTphys entries above */ for (i = 0; (i << PDRSHIFT) < *firstaddr; i++) { - ((pd_entry_t *)KPDphys)[i] = i << PDRSHIFT; - ((pd_entry_t *)KPDphys)[i] |= PG_RW | PG_V | PG_PS | PG_G; } /* And connect up the PD to the PDP */ for (i = 0; i < NKPDPE; i++) { - ((pdp_entry_t *)KPDPphys)[i + KPDPI] = KPDphys + (i << PAGE_SHIFT); - ((pdp_entry_t *)KPDPphys)[i + KPDPI] |= PG_RW | PG_V | PG_U; } /* Now set up the direct map space using either 2MB or 1GB pages */ --- 442,456 ---- /* Map from zero to end of allocations under 2M pages */ /* This replaces some of the KPTphys entries above */ for (i = 0; (i << PDRSHIFT) < *firstaddr; i++) { + ((pd_entry_t *)KPDphys)[2048 + i] = i << PDRSHIFT; + ((pd_entry_t *)KPDphys)[2048 + i] |= PG_RW | PG_V | PG_PS | PG_G; } /* And connect up the PD to the PDP */ for (i = 0; i < NKPDPE; i++) { + ((pdp_entry_t *)KPDPphys)[i + KPDPI - 4] = KPDphys + (i << PAGE_SHIFT); + ((pdp_entry_t *)KPDPphys)[i + KPDPI - 4] |= PG_RW | PG_V | PG_U; } /* Now set up the direct map space using either 2MB or 1GB pages */ We have no machine running 8-current with more than 6G memory now... Thanks, Tz-Huan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a7033710806072132i5abe2368h3db3ba269951fac5>