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
>>>>> "Cherry" == Cherry G Mathew <cherry%zyx.in@localhost> writes:
>>>>> "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 ?
Cherry> Looking at pmap_growkernel(), it seems to be well placed for
Cherry> this ( I see that you wrote the code for the early startup
Cherry> case ), although I dislike the if() within a fairly hot
Cherry> codepath.
[...]
Cherry> I'll get back with something more sane, unless you beat me
Cherry> to it.
How about the following one-liner ?
--
Cherry
diff -r 460935097df4 sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c Thu Nov 06 00:03:45 2014 +0530
+++ b/sys/arch/x86/x86/pmap.c Thu Nov 20 05:28:03 2014 +0530
@@ -4187,8 +4187,7 @@
pmap_pte_set(&pdep[i], pte);
#if defined(PAE) || defined(__x86_64__)
if (level == PTP_LEVELS && i >= PDIR_SLOT_KERN)
{
- if (__predict_true(
- cpu_info_primary.ci_flags &
CPUF_PRESENT)) {
+ if (__predict_true(mp_online == true)) {
/* update per-cpu PMDs on all
cpus */
xen_kpm_sync(pmap_kernel(), i);
} else {
Home |
Main Index |
Thread Index |
Old Index