lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240227191001.0c521b03@kernel.org>
Date: Tue, 27 Feb 2024 19:10:01 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: "Paul E. McKenney" <paulmck@...nel.org>
Cc: Eric Dumazet <edumazet@...gle.com>, Yan Zhai <yan@...udflare.com>,
 netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>, Paolo
 Abeni <pabeni@...hat.com>, Jiri Pirko <jiri@...nulli.us>, Simon Horman
 <horms@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, Lorenzo
 Bianconi <lorenzo@...nel.org>, Coco Li <lixiaoyan@...gle.com>, Wei Wang
 <weiwan@...gle.com>, Alexander Duyck <alexanderduyck@...com>, Hannes
 Frederic Sowa <hannes@...essinduktion.org>, linux-kernel@...r.kernel.org,
 rcu@...r.kernel.org, bpf@...r.kernel.org, kernel-team@...udflare.com
Subject: Re: [PATCH] net: raise RCU qs after each threaded NAPI poll

On Tue, 27 Feb 2024 10:32:22 -0800 Paul E. McKenney wrote:
> > > +                       if (!IS_ENABLED(CONFIG_PREEMPT_RT))
> > > +                               rcu_softirq_qs();
> > > +
> > >                         local_bh_enable();
> > >
> > >                         if (!repoll)
> >
> > Hmm....
> > Why napi_busy_loop() does not have a similar problem ?
> > 
> > It is unclear why rcu_all_qs() in __cond_resched() is guarded by
> > 
> > #ifndef CONFIG_PREEMPT_RCU
> >      rcu_all_qs();
> > #endif  
> 
> The theory is that PREEMPT_RCU kernels have preemption, and get their
> quiescent states that way.

But that doesn't work well enough?

Assuming that's the case why don't we add it with the inverse ifdef
condition next to the cond_resched() which follows a few lines down?

			skb_defer_free_flush(sd);
+
+			if (!IS_ENABLED(CONFIG_PREEMPT_RT))
+				rcu_softirq_qs();
+
			local_bh_enable();

			if (!repoll)
				break;

			cond_resched();
		}

We won't repoll majority of the time.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ