From: Tejun Heo <tj@kernel.org>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>,
linux-kernel@vger.kernel.org,
Suleiman Souhlal <suleiman@google.com>
Subject: Re: [PATCH] wq: handle VM suspension in stall detection
Date: Thu, 20 May 2021 12:59:07 -0400 [thread overview]
Message-ID: <YKaVW0WVu317LP7L@slm.duckdns.org> (raw)
In-Reply-To: <20210520101422.660054-1-senozhatsky@chromium.org>
On Thu, May 20, 2021 at 07:14:22PM +0900, Sergey Senozhatsky wrote:
> If VCPU is suspended (VM suspend) in wq_watchdog_timer_fn() then
> once this VCPU resumes it will see the new jiffies value, while it
> may take a while before IRQ detects PVCLOCK_GUEST_STOPPED on this
> VCPU and updates all the watchdogs via pvclock_touch_watchdogs().
> There is a small chance of misreported WQ stalls in the meantime,
> because new jiffies is time_after() old 'ts + thresh'.
>
> wq_watchdog_timer_fn()
> {
> for_each_pool(pool, pi) {
> if (time_after(jiffies, ts + thresh)) {
> pr_emerg("BUG: workqueue lockup - pool");
> }
> }
> }
>
> Save jiffies at the beginning of this function and use that value
> for stall detection. If VM gets suspended then we continue using
> "old" jiffies value and old WQ touch timestamps. If IRQ at some
> point restarts the stall detection cycle (pvclock_touch_watchdogs())
> then old jiffies will always be before new 'ts + thresh'.
>
> Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Applied to wq/for-5.13-fixes.
Thanks.
--
tejun
prev parent reply other threads:[~2021-05-20 17:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 10:14 Sergey Senozhatsky
2021-05-20 16:59 ` Tejun Heo [this message]
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=YKaVW0WVu317LP7L@slm.duckdns.org \
--to=tj@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=senozhatsky@chromium.org \
--cc=suleiman@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®