Re: CVS commit: src/sbin/mount_nfs

2017-02-04 Thread Christos Zoulas
In article <3523.1486165...@andromeda.noi.kre.to>,
Robert Elz   wrote:
>Date:Fri, 3 Feb 2017 16:56:01 -0500
>From:"Christos Zoulas" 
>Message-ID:  <20170203215601.cb806f...@cvs.netbsd.org>
>
>  | Modified Files:
>  |src/sbin/mount_nfs: getnfsargs.c
>  | 
>  | Log Message:
>  | use the netid value because it could be udp6...
>
>Did you intend to keep ...
>
>+   printf("netid=%s\n", netid);

No :-)

christos



Re: NET_MPSAFE [was Re: CVS commit: src/sys]

2017-02-04 Thread Nick Hudson

On 01/21/17 10:13, Nick Hudson wrote:

On 01/20/17 03:34, Ryota Ozaki wrote:

On Mon, Dec 12, 2016 at 5:24 PM, Nick Hudson  wrote:

On 11/28/16 09:43, Ryota Ozaki wrote:

On Mon, Nov 28, 2016 at 4:29 PM, Nick Hudson  wrote:



This is hurting me again.


FYI


https://nxr.netbsd.org/xref/src/sys/dev/usb/if_axe.c#527

I think we need NET_MPSAFE finished for netbsd-8
Further investigations show that even if we enable NET_MPSAFE by 
default,

there are cases that calling driver Tx with holding softnet_lock. For
example, packet transmission via a unconnected socket and TCP syn ack
(tcp_input still needs softnet_lock).

So I have brought another idea to address the issue: Tx softint; it
defers if_start to softint, which is implemented with deferred if_start.
By doing so, driver's if_start is called without holding softnet_lock.
Note that of course the feature is only enabled for drivers that 
request it.


This is a patch: http://www.netbsd.org/~ozaki-r/tx_softint.diff
The patch includes changes to if_axe for an example.

The drawback of the approach is of course performance degradation.
I tried it with vioif and saw 3% down on iperf. I haven't tested
it using USB devices, so I don't know the performance impact on USB Tx.

Nick, how do you think the approach? And can you try the patch and
benchmark if the approach satisfies you?


I'll look into this, but...



Thinking about this I don't think it's needed as I don't think usb 
drivers call

if_start from hard interrupt context.

Still not sure how this fixes the softnet_lock held for too long problem

Nick


Re: CVS commit: src/sbin/mount_nfs

2017-02-04 Thread Tom Ivar Helbekkmo
Robert Elz  writes:

> Did you intend to keep ...
>
> +   printf("netid=%s\n", netid);
>
> ?

He probably didn't - but updating mount_nfs (and removing this line for
tidiness) solves my NFS problem.  It now works for all combinations of
upd, tcp, ipv4, and ipv6.  :)

-tih
-- 
Most people who graduate with CS degrees don't understand the significance
of Lisp.  Lisp is the most important idea in computer science.  --Alan Kay