svn commit: r252646 - head/sys/amd64/amd64
Neel Natu
neelnatu at gmail.com
Sat Jul 20 18:26:20 UTC 2013
Hi Jean-Sebastien,
On Sat, Jul 20, 2013 at 9:28 AM, Jean-Sébastien Pédron
<dumbbell at freebsd.org> wrote:
> Hello Neel!
>
> With commit r252646, I have a "vm_page_dirty: page is invalid!" panic
> almost each time an X11 application or the X.Org server itself exit.
> Everything runs fine if I revert this commit.
>
> FreeBSD is built with the experimental radeonkms driver. As I haven't
> seen any other report of this problem, I suppose I do something wrong in
> TTM or the driver itself.
>
> Here's the core.txt:
> http://people.freebsd.org/~dumbbell/radeonkms/r252646-panic-vm_page_dirty-page-is-invalid.core.txt
>
> Do you have any suggestion about what I should look for?
>
I would start looking by looking at the value of the page table entry
in question (this would be 'tpte' in pmap_remove_pages()).
In particular, it would be useful to identify whether this is pointing
to a superpage mapping and if so what page within the superpage is
triggering the "vm_page_dirty: page is invalid" panic.
The following patch may help to do that (but I haven't actually tested it):
Index: pmap.c
===================================================================
--- pmap.c (revision 253505)
+++ pmap.c (working copy)
@@ -4379,6 +4379,20 @@
return (rv);
}
+static void
+pmap_check_valid(vm_page_t m, vm_offset_t va, pt_entry_t tpte)
+{
+ if (m->valid != VM_PAGE_BITS_ALL) {
+ printf("va = %#lx\n", va);
+ printf("tpte = %#lx\n", tpte);
+ printf("m->phys_addr = %#lx\n", m->phys_addr);
+ printf("m->valid = %#x\n", m->valid);
+ printf("m->dirty= %#x\n", m->dirty);
+ printf("m->flags = %x, aflags = %x, oflags = %x\n",
+ m->flags, m->aflags, m->oflags);
+ }
+}
+
/*
* Remove all pages from specified address space
* this aids process exit speeds. Also, this code
@@ -4469,10 +4483,14 @@
*/
if ((tpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) {
if ((tpte & PG_PS) != 0) {
- for (mt = m; mt < &m[NBPDR / PAGE_SIZE]; mt++)
+ for (mt = m; mt < &m[NBPDR / PAGE_SIZE]; mt++) {
+ pmap_check_valid(mt, pv->pv_va, tpte);
vm_page_dirty(mt);
- } else
+ }
+ } else {
+ pmap_check_valid(m, pv->pv_va, tpte);
vm_page_dirty(m);
+ }
}
CHANGE_PV_LIST_LOCK_TO_VM_PAGE(&lock, m);
best
Neel
> --
> Jean-Sébastien Pédron
>
More information about the svn-src-head
mailing list