Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292650
b: refs/heads/master
c: f0cb3c7
h: refs/heads/master
v: v3
  • Loading branch information
Konstantin Khlebnikov authored and Linus Torvalds committed Mar 22, 2012
1 parent e0a64dc commit fe290ad
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 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: 3268c63eded4612a3d07b56d1e02ce7731e6608e
refs/heads/master: f0cb3c76ae1ced85f9034480b1b24cd96530ec78
1 change: 1 addition & 0 deletions trunk/include/linux/swap.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ extern void lru_add_page_tail(struct zone* zone,
extern void activate_page(struct page *);
extern void mark_page_accessed(struct page *);
extern void lru_add_drain(void);
extern void lru_add_drain_cpu(int cpu);
extern int lru_add_drain_all(void);
extern void rotate_reclaimable_page(struct page *page);
extern void deactivate_page(struct page *page);
Expand Down
1 change: 1 addition & 0 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4825,6 +4825,7 @@ static int page_alloc_cpu_notify(struct notifier_block *self,
int cpu = (unsigned long)hcpu;

if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) {
lru_add_drain_cpu(cpu);
drain_pages(cpu);

/*
Expand Down
4 changes: 2 additions & 2 deletions trunk/mm/swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ static void lru_deactivate_fn(struct page *page, void *arg)
* Either "cpu" is the current CPU, and preemption has already been
* disabled; or "cpu" is being hot-unplugged, and is already dead.
*/
static void drain_cpu_pagevecs(int cpu)
void lru_add_drain_cpu(int cpu)
{
struct pagevec *pvecs = per_cpu(lru_add_pvecs, cpu);
struct pagevec *pvec;
Expand Down Expand Up @@ -553,7 +553,7 @@ void deactivate_page(struct page *page)

void lru_add_drain(void)
{
drain_cpu_pagevecs(get_cpu());
lru_add_drain_cpu(get_cpu());
put_cpu();
}

Expand Down

0 comments on commit fe290ad

Please sign in to comment.