All of lore.kernel.org
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: paulmck@kernel.org, urezki@gmail.com
Cc: rcu@vger.kernel.org
Subject: kfree_rcu_{monitor,work} hogged CPU for >13333us
Date: Tue, 23 Jul 2024 02:16:25 -0700	[thread overview]
Message-ID: <Zp906X7VJGNKl5fW@gmail.com> (raw)

Hello,

I have some systems with CONFIG_WQ_CPU_INTENSIVE_REPORT enabled, and rcu
workqeues are in the top offenders with the following messages:

	workqueue: kfree_rcu_monitor hogged CPU for >13333us 515 times, consider switching to WQ_UNBOUND
	workqueue: kfree_rcu_work hogged CPU for >13333us 1027 times, consider switching to WQ_UNBOUND

Chatting to Paul privately, he suggested me getting the time spend in
the two workqueues/functions above, and I created the following script
to get the histogram for these two functions:

	https://github.com/leitao/debug/blob/main/examples/rcu_timer/rcu-timer.bt

And this is the histogram I get, when running it for a few minutes
(where the lines are in msecs):


	== monitor ==
	@all_monitor:
	[8, 16)               59 |@@@@@                                               |
	[16, 32)             300 |@@@@@@@@@@@@@@@@@@@@@@@@@@@                         |
	[32, 64)               2 |                                                    |
	[64, 128)              7 |                                                    |
	[128, 256)            51 |@@@@                                                |
	[256, 512)           157 |@@@@@@@@@@@@@@                                      |
	[512, 1K)            356 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                    |
	[1K, 2K)             381 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                  |
	[2K, 4K)             480 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@        |
	[4K, 8K)             567 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
	[8K, 16K)            263 |@@@@@@@@@@@@@@@@@@@@@@@@                            |
	[16K, 32K)            25 |@@                                                  |
	[32K, 64K)             3 |                                                    |

	== work ==
	@all_work:
	[32, 64)              27 |@@@@@@@@@                                           |
	[64, 128)              2 |                                                    |
	[128, 256)             1 |                                                    |
	[256, 512)             7 |@@                                                  |
	[512, 1K)             15 |@@@@@                                               |
	[1K, 2K)              24 |@@@@@@@@                                            |
	[2K, 4K)              32 |@@@@@@@@@@                                          |
	[4K, 8K)              46 |@@@@@@@@@@@@@@@                                     |
	[8K, 16K)            154 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
	[16K, 32K)            85 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@                        |
	[32K, 64K)             3 |@                                                   |


I also broke it down for pid if it is useflu, and the output could be
found at:

	https://paste.debian.net/1324062/


Thanks
--breno

                 reply	other threads:[~2024-07-23  9:16 UTC|newest]

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:
  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=Zp906X7VJGNKl5fW@gmail.com \
    --to=leitao@debian.org \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.org \
    --cc=urezki@gmail.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.