Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210464
b: refs/heads/master
c: 0dcc48c
h: refs/heads/master
v: v3
  • Loading branch information
KAMEZAWA Hiroyuki authored and Linus Torvalds committed Sep 10, 2010
1 parent e9c0840 commit 43134df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 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: bc6930457460788e14b2c0808ed4632a1592bd61
refs/heads/master: 0dcc48c15f63ee86c2fcd33968b08d651f0360a5
16 changes: 8 additions & 8 deletions trunk/mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,19 +584,19 @@ static inline int pageblock_free(struct page *page)
/* Return the start of the next active pageblock after a given page */
static struct page *next_active_pageblock(struct page *page)
{
int pageblocks_stride;

/* Ensure the starting page is pageblock-aligned */
BUG_ON(page_to_pfn(page) & (pageblock_nr_pages - 1));

/* Move forward by at least 1 * pageblock_nr_pages */
pageblocks_stride = 1;

/* If the entire pageblock is free, move to the end of free page */
if (pageblock_free(page))
pageblocks_stride += page_order(page) - pageblock_order;
if (pageblock_free(page)) {
int order;
/* be careful. we don't have locks, page_order can be changed.*/
order = page_order(page);
if ((order < MAX_ORDER) && (order >= pageblock_order))
return page + (1 << order);
}

return page + (pageblocks_stride * pageblock_nr_pages);
return page + pageblock_nr_pages;
}

/* Checks if this range of memory is likely to be hot-removable. */
Expand Down

0 comments on commit 43134df

Please sign in to comment.