Re: [PATCH] slabasap-mm5_A2

Andrew Morton
2002-09-09T22:07:33Z

Ed Tomlinson wrote:
>
> Hi Andrew,
>
> Found three oops when checking this afternoon's log. Looks like *total_scanned can
> be zero...
>
> how about;
>
> ratio = pages > *total_scanned ? pages / (*total_scanned | 1) : 1;
>

Yup, thanks. I went the "+ 1" route ;)

Found another dumb bug in there too. In refill_inactive_zone:

while (nr_pages && !list_empty(&zone->active_list)) {
...
if (page_count(page) == 0) {
/* It is currently in pagevec_release() */
SetPageLRU(page);
list_add(&page->lru, &zone->active_list);
continue;
}
page_cache_get(page);
list_add(&page->lru, &l_hold);
nr_pages--;
}

does not terminate if the active list consists entirely of zero-count
pages. I'm not sure how I managed to abuse the system into that
state, but I did, and received a visit from the NMI watchdog for my
sins.