Linux-rt-users archive on
 help / color / Atom feed
From: Sebastian Andrzej Siewior <>
Cc: Steven Rostedt <>,
	Thomas Gleixner <>
Subject: [PATCH RT] mm/page_alloc: Use migreate_disable() in drain_local_pages_wq()
Date: Fri, 20 Mar 2020 17:56:11 +0100
Message-ID: <> (raw)

The drain_local_pages_wq() uses preempt_disable() to ensure that there
will be no CPU migration while drain_local_pages() is invoked which
might happen if the CPU is going down.
drain_local_pages() acquires a sleeping lock on RT which can not be
acquired with disabled preemption.

Use migrate_disable() instead of preempt_disable(): On RT it ensures
that the CPU won't go down and on !RT it is replaced with

Signed-off-by: Sebastian Andrzej Siewior <>
 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 99a51dfed59c7..7df9930628c2b 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2912,9 +2912,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();
-	preempt_enable();
+	migrate_enable();

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-rt-users archive on

Archives are clonable:
	git clone --mirror linux-rt-users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rt-users linux-rt-users/ \
	public-inbox-index linux-rt-users

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone