Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: LOCKDEBUG kernel option crashes if vcpu > 1



>>>>> "Manuel" == Manuel Bouyer <bouyer%antioche.eu.org@localhost> writes:

    Manuel> On Tue, Nov 18, 2014 at 10:30:28PM +0530, Cherry G. Mathew wrote:
    >> Hi,
    >> 
    >> Does the following patch work for you ?
    >> 
    >> It's a bit tricky since we use uvm_km_alloc() at early bootup
    >> (even for ci, I think this should come from a static array or a
    >> poolcache) which is what triggers the pmap_growkernel() as you
    >> probably know.


    Manuel> a static array is probably not appropriate as we can have as
    Manuel> much as 256 virtual CPUs. I don't think a poolcache would
    Manuel> help as it has to get the memory from somewhere. And as ci
    Manuel> is never freeed, a pool or poolcache would be overkill.

How about if we could map in a few more pages into kva in early boot,
like below ? 


-- 
Cherry


diff -r 32f09689dc19 sys/arch/xen/x86/x86_xpmap.c
--- a/sys/arch/xen/x86/x86_xpmap.c      Tue Nov 18 12:26:14 2014 +0530
+++ b/sys/arch/xen/x86/x86_xpmap.c      Wed Nov 19 22:23:39 2014 +0530
@@ -644,6 +644,9 @@
        mapsize += NBPG;
        mapsize += NBPG;

+       /* Pre-alloc kva for ci during cpu attach  */
+       mapsize += round_page(maxcpus * sizeof(struct cpu_info)) * NBPG;
+
 #ifdef DOM0OPS
        if (xendomain_is_dom0()) {
                /* space for ISA I/O mem */




Home | Main Index | Thread Index | Old Index