lkml.org 
[lkml]   [2004]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject2.6.8.1 sockets create-bind-unbind-bind
Date
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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.023 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site