netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Jason Xing <kerneljasonxing@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	peterz@infradead.org, tglx@linutronix.de, jstultz@google.com,
	edumazet@google.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] softirq: uncontroversial change
Date: Fri, 21 Apr 2023 11:33:50 +0200	[thread overview]
Message-ID: <140f61e2e1fcb8cf53619709046e312e343b53ca.camel@redhat.com> (raw)
In-Reply-To: <CAL+tcoBU+UD_8aXkJy95zNzFeOBMQvQE6jj9syiKvOh_wcLrcw@mail.gmail.com>

On Fri, 2023-04-21 at 10:48 +0800, Jason Xing wrote:
> 
> > My understanding is that we want to avoid adding more heuristics here,
> > preferring a consistent refactor.
> > 
> > I would like to propose a revert of:
> > 
> > 4cd13c21b207 softirq: Let ksoftirqd do its job
> > 
> > the its follow-ups:
> > 
> > 3c53776e29f8 Mark HI and TASKLET softirq synchronous
> > 0f50524789fc softirq: Don't skip softirq execution when softirq thread is parking
> 
> More than this, I list some related patches mentioned in the above
> commit 3c53776e29f8:
> 1ff688209e2e ("watchdog: core: make sure the watchdog_worker is not deferred")
> 8d5755b3f77b ("watchdog: softdog: fire watchdog even if softirqs do
> not get to run")
> 217f69743681 ("net: busy-poll: allow preemption in sk_busy_loop()")

The first 2 changes replace plain timers with HR ones, could possibly
be reverted, too, but it should not be a big deal either way.

I think instead we want to keep the third commit above, as it should be
useful when napi threaded is enabled.

Generally speaking I would keep the initial revert to the bare minimum.

> > The problem originally addressed by 4cd13c21b207 can now be tackled
> > with the threaded napi, available since:
> > 
> > 29863d41bb6e net: implement threaded-able napi poll loop support
> > 
> > Reverting the mentioned commit should address the latency issues
> > mentioned by Jakub - I verified it solves a somewhat related problem in
> > my setup - and reduces the layering of heuristics in this area.
> 
> Sure, it is. I also can verify its usefulness in the real workload.
> Some days ago I also sent a heuristics patch [1] that can bypass the
> ksoftirqd if the user chooses to mask some type of softirq. Let the
> user decide it.
> 
> But I observed that if we mask some softirqs, or we can say,
> completely revert the commit 4cd13c21b207, the load would go higher
> and the kernel itself may occupy/consume more time than before. They
> were tested under the similar workload launched by our applications.
> 
> [1]: https://lore.kernel.org/all/20230410023041.49857-1-kerneljasonxing@gmail.com/

Thanks for the reference, I would have missed that patch otherwise.

My understanding is that adding more knobs here is in the opposite
direction of what Thomas is suggesting, and IMHO the 'now mask' should
not be exposed to user-space.

> 
Thanks for the feedback,

Paolo


  reply	other threads:[~2023-04-21  9:34 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22 22:12 [PATCH 0/3] softirq: uncontroversial change Jakub Kicinski
2022-12-22 22:12 ` [PATCH 1/3] softirq: rename ksoftirqd_running() -> ksoftirqd_should_handle() Jakub Kicinski
2022-12-22 22:12 ` [PATCH 2/3] softirq: avoid spurious stalls due to need_resched() Jakub Kicinski
2023-01-31 22:32   ` Jakub Kicinski
2023-03-03 13:30   ` Thomas Gleixner
2023-03-03 15:18     ` Thomas Gleixner
2023-03-03 21:31     ` Jakub Kicinski
2023-03-03 22:37       ` Paul E. McKenney
2023-03-03 23:25         ` Dave Taht
2023-03-04  1:14           ` Paul E. McKenney
2023-03-03 23:36         ` Paul E. McKenney
2023-03-03 23:44           ` Jakub Kicinski
2023-03-04  1:25             ` Paul E. McKenney
2023-03-04  1:39               ` Jakub Kicinski
2023-03-04  3:11                 ` Paul E. McKenney
2023-03-04 20:48                   ` Paul E. McKenney
2023-03-05 20:43       ` Thomas Gleixner
2023-03-05 22:42         ` Paul E. McKenney
2023-03-05 23:00           ` Frederic Weisbecker
2023-03-06  4:30             ` Paul E. McKenney
2023-03-06 11:22               ` Frederic Weisbecker
2023-03-06  9:13         ` David Laight
2023-03-06 11:57         ` Frederic Weisbecker
2023-03-06 14:57           ` Paul E. McKenney
2023-03-07  0:51         ` Jakub Kicinski
2022-12-22 22:12 ` [PATCH 3/3] softirq: don't yield if only expedited handlers are pending Jakub Kicinski
2023-01-09  9:44   ` Peter Zijlstra
2023-01-09 10:16     ` Eric Dumazet
2023-01-09 19:12       ` Jakub Kicinski
2023-03-03 11:41     ` Thomas Gleixner
2023-03-03 14:17   ` Thomas Gleixner
2023-04-20 17:24 ` [PATCH 0/3] softirq: uncontroversial change Paolo Abeni
2023-04-20 17:41   ` Eric Dumazet
2023-04-20 20:23     ` Paolo Abeni
2023-04-21  2:48   ` Jason Xing
2023-04-21  9:33     ` Paolo Abeni [this message]
2023-04-21  9:46       ` Jason Xing
2023-05-09 19:56   ` [tip: irq/core] Revert "softirq: Let ksoftirqd do its job" tip-bot2 for Paolo Abeni

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=140f61e2e1fcb8cf53619709046e312e343b53ca.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=edumazet@google.com \
    --cc=jstultz@google.com \
    --cc=kerneljasonxing@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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).