Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165731
b: refs/heads/master
c: 2a7684a
h: refs/heads/master
i:
  165729: 83515b2
  165727: 6dde4fd
v: v3
  • Loading branch information
Wu Fengguang authored and Andi Kleen committed Sep 16, 2009
1 parent 590db0e commit 9ba918f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 888b9f7c58ebe8303bad817cd554df887a683957
refs/heads/master: 2a7684a23e9c263c2a1e8b2c0027ad1836a0f9df
20 changes: 19 additions & 1 deletion trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,12 @@ static void bad_page(struct page *page)
static unsigned long nr_shown;
static unsigned long nr_unshown;

/* Don't complain about poisoned pages */
if (PageHWPoison(page)) {
__ClearPageBuddy(page);
return;
}

/*
* Allow a burst of 60 reports, then keep quiet for that minute;
* or allow a steady drip of one report per second.
Expand Down Expand Up @@ -646,7 +652,7 @@ static inline void expand(struct zone *zone, struct page *page,
/*
* This page is about to be returned from the page allocator
*/
static int prep_new_page(struct page *page, int order, gfp_t gfp_flags)
static inline int check_new_page(struct page *page)
{
if (unlikely(page_mapcount(page) |
(page->mapping != NULL) |
Expand All @@ -655,6 +661,18 @@ static int prep_new_page(struct page *page, int order, gfp_t gfp_flags)
bad_page(page);
return 1;
}
return 0;
}

static int prep_new_page(struct page *page, int order, gfp_t gfp_flags)
{
int i;

for (i = 0; i < (1 << order); i++) {
struct page *p = page + i;
if (unlikely(check_new_page(p)))
return 1;
}

set_page_private(page, 0);
set_page_refcounted(page);
Expand Down

0 comments on commit 9ba918f

Please sign in to comment.