Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 20314
b: refs/heads/master
c: d98c7a0
h: refs/heads/master
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Feb 15, 2006
1 parent c3e02c5 commit 0c6441a
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 41d78ba55037468e6c86c53e3076d1a74841de39
refs/heads/master: d98c7a09843621f1b145ca5ae8ed03ff04085edb
9 changes: 8 additions & 1 deletion trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ long nr_swap_pages;
int percpu_pagelist_fraction;

static void fastcall free_hot_cold_page(struct page *page, int cold);
static void __free_pages_ok(struct page *page, unsigned int order);

/*
* results with 256, 32 in the lowmem_reserve sysctl:
Expand Down Expand Up @@ -173,12 +174,18 @@ static void bad_page(struct page *page)
* put_page() function. Its ->lru.prev holds the order of allocation.
* This usage means that zero-order pages may not be compound.
*/

static void free_compound_page(struct page *page)
{
__free_pages_ok(page, (unsigned long)page[1].lru.prev);
}

static void prep_compound_page(struct page *page, unsigned long order)
{
int i;
int nr_pages = 1 << order;

page[1].lru.next = NULL; /* set dtor */
page[1].lru.next = (void *)free_compound_page; /* set dtor */
page[1].lru.prev = (void *)order;
for (i = 0; i < nr_pages; i++) {
struct page *p = page + i;
Expand Down

0 comments on commit 0c6441a

Please sign in to comment.