From: Tejun Heo <tj@kernel.org>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: mgorman@techsingularity.net, vbabka@suse.cz, linux-mm@kvack.org,
hillf.zj@alibaba-inc.com, brouer@redhat.com
Subject: Re: mm: Why WQ_MEM_RECLAIM workqueue remains pending?
Date: Mon, 10 Jul 2017 14:12:14 -0400 [thread overview]
Message-ID: <20170710181214.GD1305447@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <201707071927.IGG34813.tSQOMJFOHOFVLF@I-love.SAKURA.ne.jp>
Hello, Tetsuo.
I went through the logs and it doesn't look like the mm workqueue
actually stalled, it was just slow to make progress. Please see
below.
On Fri, Jul 07, 2017 at 07:27:06PM +0900, Tetsuo Handa wrote:
> Since drain_local_pages_wq work was stalling for 144 seconds as of uptime = 541,
> drain_local_pages_wq work was queued around uptime = 397 (which is about 6 seconds
> since the OOM killer/reaper reclaimed some memory for the last time).
>
> But as far as I can see from traces, the mm_percpu_wq thread as of uptime = 444 was
> idle, while drain_local_pages_wq work was pending from uptime = 541 to uptime = 605.
> This means that the mm_percpu_wq thread did not start processing drain_local_pages_wq
> work immediately. (I don't know what made drain_local_pages_wq work be processed.)
>
> Why? Is this a workqueue implementation bug? Is this a workqueue usage bug?
So, rescuer doesn't kick as soon as the workqueue becomes slow. It
kicks in if the worker pool that the workqueue is associated with
hangs. That is, if you have other work items actively running, e.g.,
for reclaim on the pool, the pool isn't stalled and rescuers won't be
woken up. IOW, having a rescuer prevents a workqueue from deadlocking
due to resource starvation but it doesn't necessarily make it go
faster. It's a deadlock prevention mechanism, not a priority raising
one. If the work items need preferential execution, it should use
WQ_HIGHPRI.
Thanks.
--
tejun
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-07-10 18:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-29 10:57 mm: Why WQ_MEM_RECLAIM workqueue remains pending? Tetsuo Handa
2017-07-07 10:27 ` Tetsuo Handa
2017-07-10 18:12 ` Tejun Heo [this message]
2017-07-11 10:51 ` Tetsuo Handa
2017-07-11 12:19 ` Tejun Heo
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=20170710181214.GD1305447@devbig577.frc2.facebook.com \
--to=tj@kernel.org \
--cc=brouer@redhat.com \
--cc=hillf.zj@alibaba-inc.com \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=vbabka@suse.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).