OpenVZ Forum


Home » Mailing lists » Devel » [PATCH net-2.6.25 3/3] Uninline the inet_twsk_put function
Re: [PATCH net-2.6.25 3/3] Uninline the inet_twsk_put function [message #25350 is a reply to message #25265] Fri, 21 December 2007 00:08 Go to previous messageGo to previous message
davem is currently offline  davem
Messages: 463
Registered: February 2006
Senior Member
From: Ingo Oeser <netdev@axxeo.de>
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 datastructure actually works before making
such suggestions, don't just look at the context provided
purely by a patch.

"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 make such a change.

I see zero value in this.  There are millions of more useful things to
invest that kind of time on.

But you would have seen this instantly if you had spent 5 seconds
looking at how these datastructures are defined.  Instead you choose
to make me do it and explain it to you instead.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [RFC] [PATCH -mm] oom_kill: remove uid==0 checks
Next Topic: Catching the console
Goto Forum:
  


Current Time: Sun Sep 01 04:15:43 GMT 2024

Total time taken to generate the page: 0.07372 seconds