From: ravisankarreddylingareddy@gmail.com
To: rjw@rjwysocki.net, pavel@ucw.cz, len.brown@intel.com,
rafael.j.wysocki@intel.com
Cc: masaya.takahashi@sony.com, Shingo.Takeuchi@sony.com,
Srinavasa.Nagaraju@sony.com, soumya.x.khasnis@sonymobile.com,
ravisankar.reddy@sony.com, linux-pm@vger.kernel.org
Subject: [PATCH] PM: Use WQ_MEM_RECLAIM flag for PM workqueue
Date: Tue, 27 Oct 2020 15:30:04 +0530 [thread overview]
Message-ID: <20201027100004.GA30670@tsappmail.ltts.com> (raw)
Deadlock is seen under below high memory usage scenario.
kswapd waiting to reclaim memory is blocked on i/o kworker and pm_wq
context which needs to wakeup i/o kworker is waiting for kthread
creation which is again blocked in memory reclaim path.
Use WQ_MEM_RECLAIM flag for PM workqueue to avoid this deadlock.
Signed-off-by: Ravisankar Reddy (Sony) <ravisankarreddylingareddy@gmail.com>
---
kernel/power/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 40f86ec4ab30..ff5f3349e76f 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -933,7 +933,7 @@ EXPORT_SYMBOL_GPL(pm_wq);
static int __init pm_start_workqueue(void)
{
- pm_wq = alloc_workqueue("pm", WQ_FREEZABLE, 0);
+ pm_wq = alloc_workqueue("pm", WQ_FREEZABLE | WQ_MEM_RECLAIM, 0);
return pm_wq ? 0 : -ENOMEM;
}
--
2.17.1
next reply other threads:[~2020-10-27 10:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 10:00 ravisankarreddylingareddy [this message]
2020-11-05 18:42 ` [PATCH] PM: Use WQ_MEM_RECLAIM flag for PM workqueue Rafael J. Wysocki
[not found] <20201024064955.GA30892@tsappmail.ltts.com>
2020-10-26 11:23 ` Rafael J. Wysocki
2020-11-02 4:52 ` ravisankarreddy lingareddy
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201027100004.GA30670@tsappmail.ltts.com \
--to=ravisankarreddylingareddy@gmail.com \
--cc=Shingo.Takeuchi@sony.com \
--cc=Srinavasa.Nagaraju@sony.com \
--cc=len.brown@intel.com \
--cc=linux-pm@vger.kernel.org \
--cc=masaya.takahashi@sony.com \
--cc=pavel@ucw.cz \
--cc=rafael.j.wysocki@intel.com \
--cc=ravisankar.reddy@sony.com \
--cc=rjw@rjwysocki.net \
--cc=soumya.x.khasnis@sonymobile.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.