[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080617.025446.180013373.davem@davemloft.net>
Date: Tue, 17 Jun 2008 02:54:46 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: netdev@...r.kernel.org
Subject: all this business about ->sk_sleep
So you're probably wondering why I tidied up all of those code paths
setting sk_sleep inappropriately or not using sock_graft().
If you grep the net-next-2.6 tree now there are only 6 assignments to
sk->sk_sleep:
include/net/sock.h: sk->sk_sleep = NULL;
include/net/sock.h: sk->sk_sleep = &parent->wait;
net/core/sock.c: newsk->sk_sleep = NULL;
net/core/sock.c: sk->sk_sleep = &sock->wait;
net/core/sock.c: sk->sk_sleep = NULL;
net/unix/af_unix.c: newsk->sk_sleep = &newu->peer_wait;
The only thing that uses something other than &sk->sk_socket->wait
for sk->sk_sleep is AF_UNIX. So that's a useful discovery and
we may be able to get rid of sk->sk_sleep somehow. I'll try to
launch a full investiation into how and why AF_UNIX uses a special
wait queue.
But the original impetus for this consolidation is that I might
move struct socket freeing over to RCU in order to facilitate the
removal of sk->sk_callback_lock. And if so it's tidier if there
are only a handful of rcu_assign_pointer() calls to add.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists