Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156032
b: refs/heads/master
c: e084b2d
h: refs/heads/master
v: v3
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed Jul 30, 2009
1 parent 8c219f8 commit 886ba4a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 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: 51fbb4bab6c8710eb897ab3fb06efbbc921f3a8d
refs/heads/master: e084b2d95e48b31aa45f9c49ffc6cdae8bdb21d4
13 changes: 9 additions & 4 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ static struct page *__rmqueue(struct zone *zone, unsigned int order,
*/
static int rmqueue_bulk(struct zone *zone, unsigned int order,
unsigned long count, struct list_head *list,
int migratetype)
int migratetype, int cold)
{
int i;

Expand All @@ -901,7 +901,10 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order,
* merge IO requests if the physical pages are ordered
* properly.
*/
list_add(&page->lru, list);
if (likely(cold == 0))
list_add(&page->lru, list);
else
list_add_tail(&page->lru, list);
set_page_private(page, migratetype);
list = &page->lru;
}
Expand Down Expand Up @@ -1119,7 +1122,8 @@ struct page *buffered_rmqueue(struct zone *preferred_zone,
local_irq_save(flags);
if (!pcp->count) {
pcp->count = rmqueue_bulk(zone, 0,
pcp->batch, &pcp->list, migratetype);
pcp->batch, &pcp->list,
migratetype, cold);
if (unlikely(!pcp->count))
goto failed;
}
Expand All @@ -1138,7 +1142,8 @@ struct page *buffered_rmqueue(struct zone *preferred_zone,
/* Allocate more to the pcp list if necessary */
if (unlikely(&page->lru == &pcp->list)) {
pcp->count += rmqueue_bulk(zone, 0,
pcp->batch, &pcp->list, migratetype);
pcp->batch, &pcp->list,
migratetype, cold);
page = list_entry(pcp->list.next, struct page, lru);
}

Expand Down

0 comments on commit 886ba4a

Please sign in to comment.