Discussion:
how safe is NET_MPSAFE
(too old to reply)
Manuel Bouyer
2018-11-19 17:42:17 UTC
Permalink
Hello,
I'm wondering what's the status of NET_MPSAFE in netbsd-8 ?
will it have some advantage on a ftp/http/rsync server with a bnx interface ?
--
Manuel Bouyer <***@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Ryota Ozaki
2018-11-20 05:57:37 UTC
Permalink
Post by Manuel Bouyer
Hello,
I'm wondering what's the status of NET_MPSAFE in netbsd-8 ?
will it have some advantage on a ftp/http/rsync server with a bnx interface ?
Unfortunately your setups don't gain benefits from NET_MPSAFE in
netbsd-8/-current.
Layer 4 and sockets are still in KERNEL_LOCK and/or softnet_lock and bnx
isn't MP-safe yet.

The best setups benefited from NET_MPSAFE is a router with Intel NICs
(wm or ixg)
and npf.

You can check doc/TODO.smpnet to know what are MP-safe and what are not.

ozaki-r

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Manuel Bouyer
2018-11-20 08:15:16 UTC
Permalink
Post by Ryota Ozaki
Post by Manuel Bouyer
Hello,
I'm wondering what's the status of NET_MPSAFE in netbsd-8 ?
will it have some advantage on a ftp/http/rsync server with a bnx interface ?
Unfortunately your setups don't gain benefits from NET_MPSAFE in
netbsd-8/-current.
Layer 4 and sockets are still in KERNEL_LOCK and/or softnet_lock and bnx
isn't MP-safe yet.
Would there be some benefit if I make nx mp-safe ? Or is the layer 4
a killer here ?
--
Manuel Bouyer <***@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Ryota Ozaki
2018-11-20 08:33:41 UTC
Permalink
Post by Manuel Bouyer
Post by Ryota Ozaki
Post by Manuel Bouyer
Hello,
I'm wondering what's the status of NET_MPSAFE in netbsd-8 ?
will it have some advantage on a ftp/http/rsync server with a bnx interface ?
Unfortunately your setups don't gain benefits from NET_MPSAFE in
netbsd-8/-current.
Layer 4 and sockets are still in KERNEL_LOCK and/or softnet_lock and bnx
isn't MP-safe yet.
Would there be some benefit if I make nx mp-safe ? Or is the layer 4
a killer here ?
If you support H/W multiple queues and RSS on bnx, yes; part of rx
processing runs
in parallel and performance would be better slightly. OTOH, tx doesn't improve
because KERNEL_LOCK is held at the very beginning of protocol operations
(look at sys/sys/protosw.h), as you said.

If you want performance taking risks, you could try removing KERNEL_LOCK of
the send (name##_send_wrapper) and most of tx can run in parallel. I had ever
tried it and didn't get a panic at that time.

ozaki-r

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...