You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
mm: drain percpu lru add/rotate page-vectors on cpu hot-unplug
This cpu hotplug hook was accidentally removed in commit 00a62ce91e
("mm: fix Committed_AS underflow on large NR_CPUS environment")
The visible effect of this accident: 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 a temporary memory
leak.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Eric B Munson <ebmunson@us.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
3268c63ede
commit
f0cb3c76ae
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user