On Friday 07 September 2007, J. Bruce Fields wrote: > On Fri, Sep 07, 2007 at 05:49:55PM +0200, Wolfgang Walter wrote: > > Hello, > >
> > 3) For unknown reason these sockets then remain open. In the morning > > when people start their workstation again we therefor not only get a > > lot of these messages again but often the nfs-server does not proberly > > work any more. Restarting the nfs-daemon is a workaround. > I wonder why these sockets remain open, by the way. Even if they aren't used for days. Such a socket only gets deleted when the 81. socket must be opened. If I do not misunderstand the idea then temporary sockets should be destroyed after some time without activity by svc_age_temp_sockets. Now I wonder how svc_age_temp_sockets works. Does it ever close and delete a temporary socket at all? static void svc_age_temp_sockets(unsigned long closure) { struct svc_serv *serv = (struct svc_serv *)closure; struct svc_sock *svsk; struct list_head *le, *next; LIST_HEAD(to_be_aged); dprintk("svc_age_temp_sockets\n"); if (!spin_trylock_bh(&serv->sv_lock)) { /* busy, try again 1 sec later */ dprintk("svc_age_temp_sockets: busy\n"); mod_timer(&serv->sv_temptimer, jiffies + HZ); return; } list_for_each_safe(le, next, &serv->sv_tempsocks) { svsk = list_entry(le, struct svc_sock, sk_list); if (!test_and_set_bit(SK_OLD, &svsk->sk_flags)) continue; if (atomic_read(&svsk->sk_inuse) || test_bit(SK_BUSY, &svsk->sk_flags)) continue; #### doesn't this mean that svsk->sk_inuse must be zero which means that SK_DEAD is set? and wouldn't that mean that svc_delete_socket already has been called for that socket (and probably is already closed) ? and wouldn't that mean that svc_sock_enqueue which is called later does not make any sense (it checks for SK_DEAD)? #### atomic_inc(&svsk->sk_inuse); list_move(le, &to_be_aged); set_bit(SK_CLOSE, &svsk->sk_flags); set_bit(SK_DETACHED, &svsk->sk_flags); } spin_unlock_bh(&serv->sv_lock); while (!list_empty(&to_be_aged)) { le = to_be_aged.next; /* fiddling the sk_list node is safe 'cos we're SK_DETACHED */ list_del_init(le); svsk = list_entry(le, struct svc_sock, sk_list); dprintk("queuing svsk %p for closing, %lu seconds old\n", svsk, get_seconds() - svsk->sk_lastrecv); /* a thread will dequeue and close it soon */ svc_sock_enqueue(svsk); svc_sock_put(svsk); } mod_timer(&serv->sv_temptimer, jiffies + svc_conn_age_period * HZ); } Regards, -- Wolfgang Walter Studentenwerk München Anstalt des öffentlichen Rechts - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html