diff options
Diffstat (limited to 'features/rt/mm-page_alloc-Use-migrate_disable-in-drain_local_pag.patch')
-rw-r--r-- | features/rt/mm-page_alloc-Use-migrate_disable-in-drain_local_pag.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/features/rt/mm-page_alloc-Use-migrate_disable-in-drain_local_pag.patch b/features/rt/mm-page_alloc-Use-migrate_disable-in-drain_local_pag.patch new file mode 100644 index 00000000..3d068182 --- /dev/null +++ b/features/rt/mm-page_alloc-Use-migrate_disable-in-drain_local_pag.patch @@ -0,0 +1,38 @@ +From 6e618c2aeb0d445978c2cbdec84fc15eea6edb82 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Thu, 2 Jul 2020 14:27:23 +0200 +Subject: [PATCH 110/191] mm: page_alloc: Use migrate_disable() in + drain_local_pages_wq() + +drain_local_pages_wq() disables preemption to avoid CPU migration during +CPU hotplug and can't use cpus_read_lock(). + +Using migrate_disable() works here, too. The scheduler won't take the +CPU offline until the task left the migrate-disable section. + +Use migrate_disable() in drain_local_pages_wq(). + +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + mm/page_alloc.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/mm/page_alloc.c b/mm/page_alloc.c +index cfc72873961d..db713dd3e08e 100644 +--- a/mm/page_alloc.c ++++ b/mm/page_alloc.c +@@ -3038,9 +3038,9 @@ static void drain_local_pages_wq(struct work_struct *work) + * cpu which is allright but we also have to make sure to not move to + * a different one. + */ +- preempt_disable(); ++ migrate_disable(); + drain_local_pages(drain->zone); +- preempt_enable(); ++ migrate_enable(); + } + + /* +-- +2.19.1 + |