linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.6.8.1 sockets create-bind-unbind-bind
@ 2004-08-22 15:59 jmerkey
  0 siblings, 0 replies; only message in thread
From: jmerkey @ 2004-08-22 15:59 UTC (permalink / raw)
  To: linux-kernel; +Cc: jmerkey

In 2.6.8.1 af_packet.c the logic in create and bind wastes cycles.  When you create a socket 
it calls 
create which sets the socket state on po-> to "running".  Then when bind is 
first called 
it checks this "running" flag, unbinds the previous state created with "create" 
frees the sk and 
prot hook structures sets the state to running=0 then resets the state again to 
running=1 and
reallocates these structures.  This seems to waste some cycles.   caught this 
since I hook create, bind, and unbind in af_packet for our software.  It looks 
like the logic in the sockets layer above causes this behavior.

Is there a reason it should act this way.  Seems wasteful of cycles since most 
peoples just 
call create, bind,   send send rcv rcv rcv send send, unbind 

Jeff



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-08-22 15:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-22 15:59 2.6.8.1 sockets create-bind-unbind-bind jmerkey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).