Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86814
b: refs/heads/master
c: 427d541
h: refs/heads/master
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Mar 5, 2008
1 parent 8949d97 commit 123b2f2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 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: bd845e38c7a7251a95a8f2c38aa7fb87140b771d
refs/heads/master: 427d5416f317681498337ab19218d195edea02d6
5 changes: 2 additions & 3 deletions trunk/include/linux/memcontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ extern int mem_cgroup_charge(struct page *page, struct mm_struct *mm,
gfp_t gfp_mask);
extern void mem_cgroup_uncharge(struct page_cgroup *pc);
extern void mem_cgroup_uncharge_page(struct page *page);
extern void mem_cgroup_move_lists(struct page_cgroup *pc, bool active);
extern void mem_cgroup_move_lists(struct page *page, bool active);
extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
struct list_head *dst,
unsigned long *scanned, int order,
Expand Down Expand Up @@ -106,8 +106,7 @@ static inline void mem_cgroup_uncharge_page(struct page *page)
{
}

static inline void mem_cgroup_move_lists(struct page_cgroup *pc,
bool active)
static inline void mem_cgroup_move_lists(struct page *page, bool active)
{
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,13 @@ int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem)
/*
* This routine assumes that the appropriate zone's lru lock is already held
*/
void mem_cgroup_move_lists(struct page_cgroup *pc, bool active)
void mem_cgroup_move_lists(struct page *page, bool active)
{
struct page_cgroup *pc;
struct mem_cgroup_per_zone *mz;
unsigned long flags;

pc = page_get_page_cgroup(page);
if (!pc)
return;

Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ void activate_page(struct page *page)
SetPageActive(page);
add_page_to_active_list(zone, page);
__count_vm_event(PGACTIVATE);
mem_cgroup_move_lists(page_get_page_cgroup(page), true);
mem_cgroup_move_lists(page, true);
}
spin_unlock_irq(&zone->lru_lock);
}
Expand Down
5 changes: 3 additions & 2 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
ClearPageActive(page);

list_move(&page->lru, &zone->inactive_list);
mem_cgroup_move_lists(page_get_page_cgroup(page), false);
mem_cgroup_move_lists(page, false);
pgmoved++;
if (!pagevec_add(&pvec, page)) {
__mod_zone_page_state(zone, NR_INACTIVE, pgmoved);
Expand Down Expand Up @@ -1156,8 +1156,9 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
VM_BUG_ON(PageLRU(page));
SetPageLRU(page);
VM_BUG_ON(!PageActive(page));

list_move(&page->lru, &zone->active_list);
mem_cgroup_move_lists(page_get_page_cgroup(page), true);
mem_cgroup_move_lists(page, true);
pgmoved++;
if (!pagevec_add(&pvec, page)) {
__mod_zone_page_state(zone, NR_ACTIVE, pgmoved);
Expand Down

0 comments on commit 123b2f2

Please sign in to comment.