Discussion:
re(4) mpsafe
(too old to reply)
Jared McNeill
2017-04-16 23:45:44 UTC
Permalink
Hi folks --

In a (failed) attempt to get more performance out of re(4) on NetBSD/arm,
I've made some changes to re(4) to support NET_MPSAFE. I'm not too
familiar with code in this area, so I thought I'd post it for feedback:

http://www.invisible.ca/tmp/re-mpsafe.patch

Thanks,
Jared

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Roy Marples
2017-04-17 09:00:48 UTC
Permalink
Hi Jared
Post by Jared McNeill
In a (failed) attempt to get more performance out of re(4) on
NetBSD/arm, I've made some changes to re(4) to support NET_MPSAFE. I'm
not too familiar with code in this area, so I thought I'd post it for
http://www.invisible.ca/tmp/re-mpsafe.patch
+#define RE_LOCK(_sc) mutex_enter(&(_sc)->sc_lock)
+#define RE_UNLOCK(_sc) mutex_exit(&(_sc)->sc_lock)

+ mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NET);
+

My only comment would be one of consistency. You hide the locking
mechanism in macros, but not the init/destruction part.

Roy

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Jared McNeill
2017-04-17 12:29:09 UTC
Permalink
My only comment would be one of consistency. You hide the locking mechanism
in macros, but not the init/destruction part.
Good call, I'll make that change.

Cheers,
Jared

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Jared McNeill
2017-04-17 23:01:00 UTC
Permalink
Post by Jared McNeill
Hi folks --
In a (failed) attempt to get more performance out of re(4) on NetBSD/arm,
I've made some changes to re(4) to support NET_MPSAFE. I'm not too familiar
http://www.invisible.ca/tmp/re-mpsafe.patch
I've updated the patch with Roy's feedback plus changes to how interrupt
mitigation works on 8168 based boards.

With these changes I'm now starting to see reasonable numbers from the
8111G in the NVIDIA Jetson TK1 board:

tegra# ./iperf3.sh
Connecting to host 169.254.188.175, port 5201
...
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.01 sec 771 MBytes 647 Mbits/sec 0 sender
[ 4] 0.00-10.01 sec 771 MBytes 647 Mbits/sec receiver

tegra# ./iperf3.sh -R
Connecting to host 169.254.188.175, port 5201
Reverse mode, remote host 169.254.188.175 is sending
...
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.00 sec 991 MBytes 831 Mbits/sec 2149 sender
[ 4] 0.00-10.00 sec 990 MBytes 830 Mbits/sec receiver


Cheers,
Jared

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