Hi David,
David Miller schrieb:
> "inet_timewait_sock" begins with a "struct sock_common"
> which is where the atomic_t is, and:
>
> #define tw_refcnt __tw_common.skc_refcnt
>
> So you would have to change struct sock_common over to kref, and thus
> the entire networking, in order to
From: Ingo Oeser <[EMAIL PROTECTED]>
Date: Thu, 20 Dec 2007 19:32:45 +0100
> static inline inet_twsk_put(struct inet_timewait_sock *tw)
> {
> kref_put(&tw->kref, inet_twsk_release);
> }
>
> David, can you see any reason (e.g. some crazy lock stuff) NOT to do this?
Look at how this datastru
From: Pavel Emelyanov <[EMAIL PROTECTED]>
Date: Wed, 19 Dec 2007 13:56:13 +0300
> This one is not that big, but is widely used: saves 1200 bytes
> from net/ipv4/built-in.o
>
> add/remove: 1/0 grow/shrink: 1/12 up/down: 97/-1300 (-1203)
> function old new
Pavel Emelyanov schrieb:
> This one is not that big, but is widely used: saves 1200 bytes
> from net/ipv4/built-in.o
> +void inet_twsk_put(struct inet_timewait_sock *tw)
> +{
> + if (atomic_dec_and_test(&tw->tw_refcnt)) {
> + struct module *owner = tw->tw_prot->owner;
> +
This one is not that big, but is widely used: saves 1200 bytes
from net/ipv4/built-in.o
add/remove: 1/0 grow/shrink: 1/12 up/down: 97/-1300 (-1203)
function old new delta
inet_twsk_put - 87 +87
__inet_lookup_liste