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 Wed, Nov 19, 2014 at 12:44:54PM +0100, Manuel Bouyer wrote:
    >> > mapsize += NBPG;
    >> > 
    >> > + /* Pre-alloc kva for ci during cpu attach */ > + mapsize +=
    >> round_page(maxcpus * sizeof(struct cpu_info)) * NBPG; > +
    >> 
    >> On amd64 this makes 2193 extra slots.  What's the problem with
    >> making pmap_growkernel() work as expected ?


Looking at pmap_growkernel(), it seems to be well placed for this ( I
see that you wrote the code for the early startup case ), although I
dislike the if() within a fairly hot codepath.

I also just noticed in amd64/include/param.h:

#ifndef XEN
/* Must be defined before cpu.h */
#define MAXCPUS 256
#endif

which means that maxcpus is 32 for XEN ? (Not sure when this happened).

    Manuel> I'll add that it's not clear for me that this patch would
    Manuel> avoid the problematic call to pmap_growkernel when 256 CPUs
    Manuel> are present.

Actually the patch is wrong - I assumed that it does the equivalent of
pmap_growkernel() at early boot, but of course, ci is allocated via
uvm_km_alloc() and friends which backing pages are after avail_start so
that's completely wrong ( also I haven't updated map_end and the per-cpu
ci  allocation code).

I'll get back with something more sane, unless you beat me to it.

-- 
Cherry


Home | Main Index | Thread Index | Old Index