tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: how safe is NET_MPSAFE



On Tue, Nov 20, 2018 at 5:15 PM Manuel Bouyer <bouyer%antioche.eu.org@localhost> wrote:
>
> On Tue, Nov 20, 2018 at 02:57:37PM +0900, Ryota Ozaki wrote:
> > On Tue, Nov 20, 2018 at 2:42 AM Manuel Bouyer <bouyer%antioche.eu.org@localhost> wrote:
> > >
> > > 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


Home | Main Index | Thread Index | Old Index