DragonFly BSD
DragonFly kernel List (threaded) for 2009-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Socket related stuff


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 11 Nov 2009 12:30:59 -0800 (PST)

    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@backplane.com>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]