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]
Date: Mon, 26 Feb 2024 12:59:22 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jesper Dangaard Brouer <hawk@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Wander Lairson Costa <wander@...hat.com>,
	Yan Zhai <yan@...udflare.com>
Subject: Re: [PATCH v2 net-next 3/3] net: Use backlog-NAPI to clean up the
 defer_list.

On 2024-02-23 18:02:57 [-0800], Jakub Kicinski wrote:
> On Wed, 21 Feb 2024 18:00:13 +0100 Sebastian Andrzej Siewior wrote:
> > +	if (use_backlog_threads()) {
> > +		rps_lock_irqsave(sd, &flags);
> > +
> > +		if (!__test_and_set_bit(NAPI_STATE_SCHED, &sd->backlog.state))
> > +			napi_schedule_rps(sd);
> 
> Why are you calling napi_schedule_rps() here?
> Just do __napi_schedule_irqoff(&sd->backlog);
Looking at it, __napi_schedule_irqoff() is enough here given that we are
already in the use_backlog_threads() case.

> Then you can move the special case inside napi_schedule_rps()
> into the if (sd != mysd) block.

Okay.

> > +		rps_unlock_irq_restore(sd, &flags);
> 
> Also not sure if the lock helpers should still be called RPS since they
> also protect state on non-RPS configs now.

They protect the list in input_pkt_queue and the NAPI state. It is just
in the !RPS case it is always CPU-local and the lock is avoided (while
interrupts are still disabled/ enabled).

What about
	input_queue_lock_irq_save()
	input_queue_lock_irq_disable()
	input_queue_lock_irq_restore()
	input_queue_lock_irq_enable()
? 

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ