Re: [mmotm] BUG: Bad page state in process khugepaged ?

From: KAMEZAWA Hiroyuki
Date: Wed Feb 09 2011 - 01:46:33 EST


On Wed, 9 Feb 2011 15:10:36 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:

> 2nd log, "kernel BUG at include/linux/mm.h:420!" is This one.
> ==
> static inline void __ClearPageBuddy(struct page *page)
> {
> VM_BUG_ON(!PageBuddy(page));
> atomic_set(&page->_mapcount, -1);
> }
> ==
> But this is just a tail of bad_page().
> ==
> static void bad_page(struct page *page)
> {
> static unsigned long resume;
> static unsigned long nr_shown;
> static unsigned long nr_unshown;
> ...
> dump_stack();
> out:
> /* Leave bad fields for debug, except PageBuddy could make trouble */
> __ClearPageBuddy(page);
> add_taint(TAINT_BAD_PAGE);
> }
> ==
> So, what important is bad_page().
>
> BAD page says
> ==
> BUG: Bad page state in process khugepaged pfn:1e9800
> page:ffffea0006b14000 count:0 mapcount:0 mapping: (null) index:0x2800
> page flags: 0x40000000004000(head)
> pc:ffff880214a30000 pc->flags:2146246697418756 pc->mem_cgroup:ffffc9000177a000
> ==
>
> Maybe page_mapcount(page) was > 0. and ->mapping was NULL.
Sorry please ignore above. bad_page() used page_mapcount().


Regards,
-Kame





--
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/