From: Andrea Righi <andrea.righi@canonical.com>
To: Joel Fernandes <joel@joelfernandes.org>
Cc: "Paul E. McKenney" <paulmck@kernel.org>,
Uladzislau Rezki <urezki@gmail.com>,
Joel Fernandes <joelaf@google.com>,
rcu@vger.kernel.org,
"Cc: Frederic Weisbecker" <fweisbec@gmail.com>
Subject: Re: Observation on NOHZ_FULL
Date: Wed, 7 Feb 2024 18:05:55 +0100 [thread overview]
Message-ID: <ZcO4c6nxemyxRFz3@gpd> (raw)
In-Reply-To: <CAEXW_YQN=Dm4TXv+F=Q4bfnKWn1Tv52=8hz50JLkbufcM5hUpQ@mail.gmail.com>
On Wed, Feb 07, 2024 at 11:52:35AM -0500, Joel Fernandes wrote:
> On Wed, Feb 7, 2024 at 11:31 AM Andrea Righi <andrea.righi@canonical.com> wrote:
>
> > > The actual number of callbacks should not be causing specifically the
> > > hrtimer_interrupt() to take too long to run, AFAICS. But RCU's lazy feature does
> > > increase the number of timer interrupts.
> > >
> > > Further still, it depends on how much hrtimer_interrupt() takes with lazy RCU to
> > > call it a problem IMO. Some numbers with units will be nice.
> >
> > This is what I see (this is a single run, but the other runs are
> > similar), unit is nanosec, with lazy RCU enabled hrtimer_interrupt()
> > takes around 4K-16K ns, with lazy RCU off most of the times it takes
> > 2K-4K ns:
> >
> > - lazy rcu off:
> >
> > [1K, 2K) 88307 |@@@@@@@@@@@@ |
> > [2K, 4K) 380695 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
> > [4K, 8K) 194 | |
> >
> > - lazy rcu on:
> >
> > [2K, 4K) 3094 | |
> > [4K, 8K) 265763 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
> > [8K, 16K) 182341 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
> > [16K, 32K) 3422 | |
> >
> > Again, I'm not sure if this is really a problem or not, or if it is even
> > a relevant metric for the overall performance, I was just curious to
> > understand why it is different.
>
> This is an interesting find, the number of timer interrupt executions
> looks roughly the same in this histogram so it might not be missed
> cancellations or such, so it is not clear to me. But it is worth
> debugging and we'll try to reproduce your results.
>
> Some more theories from our internal RCU discussion:
> - Could it be another user of RCU (call_rcu) from an unrelated hrtimer
> interrupt callback that is causing a "flush" of lazy callbacks?
> - What does the distribution look like for
> do_nocb_deferred_wakeup_timer ? That will have to probably be made
> non-static to be picked up by bpftrace (If you could try that real
> quick, appreciate!).
Sure, I'll repeat the test tracing do_nocb_deferred_wakeup_timer.
>
> Slightly related, but one of the things we are wondering also is how
> much of the overhead for your nohz-full and lazy-RCU test (on top of
> baseline - that is just CONFIG_HZ=1000 without nohz-full or nocbs) is
> because of just using NOCB. Uladsizlau mentioned he might run a test
> for comparing along those lines as well.
Just to clarify, "lazy rcu on" results are just with rcu_nocb=all and
lazy RCUs enabled (and HZ=1000), so without nohz_full.
If I enable only nohz_full=all (without rcu_nocb) I see something like
this:
[1K, 2K) 294 | |
[2K, 4K) 59568 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
[4K, 8K) 368 | |
That is like baseline result / 8 invocations, because I have 8 cores and
only the timekeeping CPU is ticking, so that seems to make sense.
-Andrea
next prev parent reply other threads:[~2024-02-07 17:05 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-29 17:47 Observation on NOHZ_FULL Joel Fernandes
2024-01-29 20:41 ` Paul E. McKenney
2024-01-29 22:16 ` Joel Fernandes
2024-01-30 6:58 ` Andrea Righi
2024-01-30 10:17 ` Paul E. McKenney
2024-01-30 11:06 ` Uladzislau Rezki
2024-01-30 11:27 ` Andrea Righi
2024-01-30 11:41 ` Uladzislau Rezki
2024-01-30 13:39 ` Paul E. McKenney
2024-02-06 17:51 ` Andrea Righi
2024-02-06 18:44 ` Paul E. McKenney
2024-02-07 13:04 ` Uladzislau Rezki
2024-02-07 15:12 ` Andrea Righi
2024-02-07 15:49 ` Joel Fernandes
2024-02-15 7:51 ` Andrea Righi
2024-02-15 13:15 ` Uladzislau Rezki
2024-02-15 14:02 ` Joel Fernandes
2024-02-07 15:48 ` Joel Fernandes
2024-02-07 16:31 ` Andrea Righi
2024-02-07 16:52 ` Joel Fernandes
2024-02-07 17:05 ` Andrea Righi [this message]
2024-02-08 5:54 ` Joel Fernandes
2024-02-08 6:55 ` Andrea Righi
2024-02-08 12:53 ` Uladzislau Rezki
2024-02-08 14:51 ` Uladzislau Rezki
2024-02-12 0:22 ` Joel Fernandes
2024-02-12 9:05 ` Uladzislau Rezki
2024-02-12 9:44 ` Uladzislau Rezki
2024-01-29 20:48 ` Uladzislau Rezki
2024-01-29 22:20 ` Joel Fernandes
2024-01-29 22:43 ` Frederic Weisbecker
2024-01-29 22:53 ` Joel Fernandes
2024-01-29 23:11 ` Frederic Weisbecker
2024-01-29 23:36 ` Joel Fernandes
2024-01-30 0:40 ` Paul E. McKenney
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=ZcO4c6nxemyxRFz3@gpd \
--to=andrea.righi@canonical.com \
--cc=fweisbec@gmail.com \
--cc=joel@joelfernandes.org \
--cc=joelaf@google.com \
--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.