Re: kernel BUG at mm/vmscan.c:1114

From: Andrew Morton
Date: Tue Aug 02 2011 - 13:13:21 EST


On Tue, 2 Aug 2011 15:24:59 +0100 Mel Gorman <mgorman@xxxxxxx> wrote:

> On Tue, Aug 02, 2011 at 03:09:57PM +0800, Xiaotian Feng wrote:
> > Hi,
> > __ __I'm hitting the kernel BUG at mm/vmscan.c:1114 twice, each time I
> > was trying to build my kernel. The photo of crash screen and my config
> > is attached. Thanks.
> > Regards
> > Xiaotian
>
> I am obviously blind because in 3.0, I cannot see what BUG is at
> mm/vmscan.c:1114 :(. I see
>
> 1109: /*
> 1110: * If we don't have enough swap space, reclaiming of
> 1111: * anon page which don't already have a swap slot is
> 1112: * pointless.
> 1113: */
> 1114: if (nr_swap_pages <= 0 && PageAnon(cursor_page) &&
> 1115: !PageSwapCache(cursor_page))
> 1116: break;
> 1117:
> 1118: if (__isolate_lru_page(cursor_page, mode, file) == 0) {
> 1119: list_move(&cursor_page->lru, dst);
> 1120: mem_cgroup_del_lru(cursor_page);
>
> Is this 3.0 vanilla or are there some other patches applied?
>

"3.0.0+": Current mainline.

static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
struct list_head *src, struct list_head *dst,
unsigned long *scanned, int order, int mode, int file)
{
unsigned long nr_taken = 0;
unsigned long nr_lumpy_taken = 0;
unsigned long nr_lumpy_dirty = 0;
unsigned long nr_lumpy_failed = 0;
unsigned long scan;

for (scan = 0; scan < nr_to_scan && !list_empty(src); scan++) {
struct page *page;
unsigned long pfn;
unsigned long end_pfn;
unsigned long page_pfn;
int zone_id;

page = lru_to_page(src);
prefetchw_prev_lru_page(page, src, flags);

VM_BUG_ON(!PageLRU(page));

switch (__isolate_lru_page(page, mode, file)) {
case 0:
list_move(&page->lru, dst);
mem_cgroup_del_lru(page);
nr_taken += hpage_nr_pages(page);
break;

case -EBUSY:
/* else it is being freed elsewhere */
list_move(&page->lru, src);
mem_cgroup_rotate_lru_list(page, page_lru(page));
continue;

default:
-->> BUG();
}

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