tech-kern archive

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

Re: how can the nfs timer work?



On Sat, Dec 13, 2008 at 01:56:28PM +0000, Andrew Doran wrote:

> On Thu, Dec 11, 2008 at 01:55:33AM +0200, Antti Kantee wrote:
> 
> > I've been trying to figure out why the nfs timer (nfs_timer() in
> > nfs_socket.c) works.
> > 
> > 1) I don't really see what good splsoftnet does, as the queue is
> >    never messed with in network interrupt context AFAICT.  Even if
> >    this holds for the queue, there is nothing protecting the actual
> >    requests apart from biglock.
> 
> That is a problem. There is work on a branch to make the nfs client MPSAFE.
> 
> > 2) It does a call to solock(), which pretty clearly can block and
> >    therefore the request currently being processed can be invalidated
> >    and freed during the call to solock().  (are callouts even allowed
> >    to block??)
> 
> Callouts can block, yup.
>  
> > But I'm really curious why this doesn't trigger in the kernel pretty much
> > instantly.
> 
> Luck?

A workaround appropriate for 5.0 would be to take softnet_lock around the
entire loop, and comment out the solock/sounlock calls. This would lock all
inet/inet6 sockets.

Andrew


Home | Main Index | Thread Index | Old Index