All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kip Macy <kip.macy@gmail.com>
To: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: Re: xm pause causing lockup
Date: Fri, 15 Apr 2005 14:04:00 -0700	[thread overview]
Message-ID: <b1fa291705041514046f3b20e9@mail.gmail.com> (raw)
In-Reply-To: <A95E2296287EAD4EB592B5DEEFCE0E9D1E3BC6@liverpoolst.ad.cl.cam.ac.uk>

> Does this happen if you boot with 'nosmp'? I don't really believe it's a
> race, but might be worth checking.

Yes, it still happens. It would have found it quite astonishing if it
were a race.
(XEN) EIP:    0808:[<fc52d5a3>]
(gdb) x/i 0xfc52d5a3
0xfc52d5a3 <get_page_type+265>: mov    0x14(%eax),%eax
(gdb) info line *0xfc52d5a3
Line 1236 of "mm.c" starts at address 0xfc52d5a0 <get_page_type+262>
and ends at 0xfc52d5b0 <get_page_type+278>.
(gdb) 

Line 1236-1240 of local mm.c:
            while ( (y = page->u.inuse.type_info) == x )
                cpu_relax();
            counter++;
            printk("page was not validated");
            goto again;

> Also, it's worth adding a printk into this loop just to check that that
> is where you're getting caught.

Obviously wasn't thinking and stuck it in the wrong place.
Nonetheless, even without the printk I think I've proven my point.


> 
>             /* Someone else is updating validation of this page. Wait...
> */
>             while ( (y = page->u.inuse.type_info) == x )
>                 cpu_relax();
>             goto again;

Yep.

> 
> We need to figure out how the type count managed to get to one without
> the page being validated. I presume you're doing a debug=y build of Xen?

Correct. Nothing comes out on the console apart from debug output from FreeBSD.

> Do you get any warnings about illegal mmu_update attempts when you boot
> FreeBSD?

No, I don't. This is the offending code snippet from pmap_pinit:

        /* install self-referential address mapping entry(s) */
	for (i = 0; i < NPGPTD; i++) {
		ma = xpmap_ptom(VM_PAGE_TO_PHYS(ptdpg[i]));
		pmap->pm_pdir[PTDPTDI + i] = ma | PG_V | PG_A | PG_M;
#ifdef PAE
		pmap->pm_pdpt[i] = ma | PG_V;
#endif
		/* re-map page directory read-only */
		PT_SET_MA(pmap->pm_pdir, *vtopte((vm_offset_t)pmap->pm_pdir) & ~PG_RW);
		xen_pgd_pin(ma);
	}

PT_SET_MA is just a wrapper for update_va_mapping. Have there been any
recent changes to the page typing code that would cause it to get
confused by a self-referential mapping?

                          -Kip

  reply	other threads:[~2005-04-15 21:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-15 19:29 xm pause causing lockup Ian Pratt
2005-04-15 21:04 ` Kip Macy [this message]
2005-04-16 19:59   ` buggy linear page table handling " Kip Macy
  -- strict thread matches above, loose matches on Subject: below --
2005-04-15 17:25 Ian Pratt
2005-04-15 18:57 ` Kip Macy
2005-04-15  6:53 Ian Pratt
2005-04-15 17:12 ` Kip Macy
2005-04-14  2:46 Kip Macy
2005-04-14  3:03 ` Keir Fraser
2005-04-14  3:03   ` Kip Macy
2005-04-14  3:16     ` Keir Fraser
2005-04-14  3:18       ` Kip Macy
2005-04-14 19:41         ` Kip Macy
2005-04-14 21:04           ` Kip Macy
2005-04-15  4:36             ` Kip Macy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b1fa291705041514046f3b20e9@mail.gmail.com \
    --to=kip.macy@gmail.com \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.