Socket related stuff

Matthew Dillon dillon at apollo.backplane.com
Wed Nov 11 12:37:08 PST 2009


    I hit another race in the TCP connect code related to implied
    connects on sendmsg().

    I am going to be changing the so_mport stuff a bit to improve code
    flow and fix the issue as well as other issues where sockets have
    to migrate between cpus.  This will also improve performance as the
    target message port will be cached in the socket structure.  It will
    also allow us to do things like spread unix domain sockets and
    possibly even socketpairs across multiple cpus.

    I will be storing the target port in the socket structure and will
    modify the message service loop to forward messages that wind up on
    the wrong port (due to the protocol changing the port during e.g.
    a connect()).

    This will remove a ton of special cases.  One special case will be
    added to synchronize port changes.  For example, if a ton of sendmsg()
    calls are made (and the first was for an implied connect), then when
    the port is changed the socket will have to ensure that no new
    messages are queued to the new port until all messages sitting on the
    old port have been properly forwarded.

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>





More information about the Kernel mailing list