mm: drain percpu lru add/rotate page-vectors on cpu hot-unplug
Subsystems (3)
PATCH RESEND 1/1 mm: drain percpu lru add/rotate page-vectors on cpu hot-unplug
This cpu hotplug hook was accidentally removed in commit v2.6.30-rc4-18-g00a62ce ("mm: fix Committed_AS underflow on large NR_CPUS environment")
--- include/linux/swap.h | 1 + mm/page_alloc.c | 1 + mm/swap.c | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-)
include/linux/swap.h +1 -0
@@ -229,6 +229,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);
mm/page_alloc.c +1 -0
@@ -4874,6 +4874,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);/*
mm/swap.c +2 -2
@@ -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;
@@ -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 (); }
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 4 lines · On Tue, 28 Feb 2012 23:40:45 +0400 Konstantin Khlebnikov…
This cpu hotplug hook was accidentally removed in commit v2.6.30-rc4-18-g00a62ce ("mm: fix
Committed_ASunderflow on largeNR_CPUSenvironment")Signed-off-by Konstantin Khlebnikov <[email protected]>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Andrew Morton
maintainerQuoted 2 lines · On Tue, 28 Feb 2012 23:40:45 +0400 Konstantin Khlebnikov…
This cpu hotplug hook was accidentally removed in commit v2.6.30-rc4-18-g00a62ce ("mm: fix
Committed_ASunderflow on largeNR_CPUSenvironment")
That was a long time ago - maybe we should leave it removed ;) I mean, did this bug(?) have any visible effect? If so, what was that effect?
IOW, the changelog didn't give anyone any reason to apply the patch to anything!
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 8 lines · Andrew Morton
Quoted 2 lines · On Tue, 28 Feb 2012 23:40:45 +0400 Konstantin…
This cpu hotplug hook was accidentally removed in commit v2.6.30-rc4-18-g00a62ce ("mm: fix
Committed_ASunderflow on largeNR_CPUSenvironment")That was a long time ago - maybe we should leave it removed ;) I mean, did this bug(?) have any visible effect? If so, what was that effect?
It's because cpu hotplug/unplug isn't widely used feature.
Visible effect -- some pages are borrowed in per-cpu page-vectors. Truncate can deal with it, but these pages cannot be reused while this cpu is offline. So this is like temporary memory leak.
Quoted 3 lines
IOW, the changelog didn't give anyone any reason to apply the patch to anything!
Sorry, I'm just stuck in pile of patches. It seems I should stop and send them one by one. This one isn't critical, so there no reasons for pushing it into stable branches.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>