Re: do we want to kill VM_RESERVED or not? [was Re: 2.6.5-rc1-aa3]
From: Marc-Christian Petersen
Date: Tue Mar 23 2004 - 04:57:02 EST
On Monday 22 March 2004 13:42, Andrea Arcangeli wrote:
Hi Andrea,
> I see, the below patch will avoid your oops (I also removed the stack
> trace dump from memory.c since it's useless to get the stack trace from
> there and this will reduce the noise).
> --- x/mm/memory.c.~1~ 2004-03-21 15:21:42.000000000 +0100
> +++ x/mm/memory.c 2004-03-22 13:40:26.852849384 +0100
> @@ -324,9 +324,11 @@ skip_copy_pte_range:
> * Device driver pages must not be
> * tracked by the VM for unmapping.
> */
> - BUG_ON(!page_mapped(page));
> - BUG_ON(!page->mapping);
> - page_add_rmap(page, vma, address, PageAnon(page));
> + if (likely(page_mapped(page) && page->mapping))
> + page_add_rmap(page, vma, address, PageAnon(page));
> + else
> + printk("Badness in %s at %s:%d\n",
> + __FUNCTION__, __FILE__, __LINE__);
> } else {
> BUG_ON(page_mapped(page));
> BUG_ON(page->mapping);
> @@ -1429,7 +1431,9 @@ retry:
> * real anonymous pages, they're "device" reserved pages instead.
> */
> reserved = !!(vma->vm_flags & VM_RESERVED);
> - WARN_ON(reserved == pageable);
> + if (unlikely(reserved == pageable))
> + printk("Badness in %s at %s:%d\n",
> + __FUNCTION__, __FILE__, __LINE__);
>
> /*
> * Should we do an early C-O-W break?
Perfect. Thanks alot.
> many thanks for the help!
You're welcome. Thanks for your help!
ciao, Marc
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/