LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [Patch] Unconnected UDP

To: Horms <horms@xxxxxxxxxxxx>
Subject: Re: [Patch] Unconnected UDP
Cc: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
From: Julian Anastasov <ja@xxxxxx>
Date: Tue, 2 Mar 2004 00:25:22 +0200 (EET)
        Hello,

On Mon, 1 Mar 2004, Horms wrote:

> The attached patches for LVS and ipvsadm add a flag to services
> to allow them to treat UDP as unconnected, the current code
> assumes connected udp. More specifically, it sets the connection
> entry timout to 0. This probably could have been done more
> efficiently, but I tried to make the change in keeping with the
> current code base. The default for this option is off which gives
> the existing behaviour.

        It is interesting, where is this feature used?

        I remember I created similar thing: ops-0.9.5-4.diff,
it is on the bottom of my page. Note that using timeout 0 is not a
good idea for the following reasons:

- the connection lives for 1/HZ time which can be bad in some setups,
may be you can avoid hashing the conn

- there is a race on SMP with the new kernel timers because two
IPVS packet handlers can modify the timer twice or more times
at the time when the kernel timers start on one or many CPUs.
The following change fixed this race for IPVS 2.6 and now it is still
not allowed to use short timeouts (<= 1 jiffie):

http://linux.bkbits.net:8080/linux-2.5/diffs/net/ipv4/ipvs/ip_vs_conn.c@xxxx?nav=index.html|src/|src/net|src/net/ipv4|src/net/ipv4/ipvs|hist/net/ipv4/ipvs/ip_vs_conn.c

        The fix for this 2nd problem is again to avoid hashing the
connection, then only one CPU can use mod_timer for it.

        So, if hashing is avoided we achieve real per-packet scheduling.

Regards

--
Julian Anastasov <ja@xxxxxx>
<Prev in Thread] Current Thread [Next in Thread>