On Mon, Nov 07, 2005 at 11:44:25PM +0200, Julian Anastasov wrote:
>
> Hello,
>
> On Mon, 7 Nov 2005, Horms wrote:
>
> > That seems like a good work around to me, though perhaps HZ would
> > be better than 10*HZ.
> >
> > Here is a patch to formalise it slightly. This is for 2.6, i'll send a
> > version for 2.5 shortly.
>
> This patch is ok, it should be the only patch we need for
> 2.6. Similar patch that preserves current timeout for normal conns
> should be 2nd for 2.4, the 1st one being the patch that syncs
> ip_vs_conn_expire_now to 2.6 state. You can send these 3 patches
> to DaveM after short testing.
I finally got around to preparing the backport and patch for Dave,
and in the course of doing this I realises that as long as
ip_vs_conn_expire() doesn't reeset the timer, the problem goes away.
This is because the problem is not how long the persistance entry
stays around, but rather that it changes from the user-configured
value.
In any case, not reseting the timeout in ip_vs_conn_expire() is a
cleanup, so I came up with the following patch for 2.6. The slightly
longer version for 2.4, which includes backporting the del_timer
behaviour to ip_vs_conn_expire_now() is in the following message.
[IPVS] Cleanup and persistance timeout reset fix
ip_vs_conn_expire_now() used to set timeout values to 0,
and because of this ip_vs_conn_expire() reset them to some
other value. However, ip_vs_conn_expire_now() now deletes
timers, so there is no reason for ip_vs_conn_expire() to
reset timers.
It turns out that the current behaviour causes the timeout of
persistance templates to be changed from their user-configured
timeout in the situation where they timeout before their controled
connections. This can happen if the user configures the
persistane timeout to less than IP_VS_TCP_S_FIN_WAIT (2 minutes).
And although such small persistance timeouts are of questionable
value, its still an unexpected, weird behaviour, without any
benifits.
See:
http://archive.linuxvirtualserver.org/html/lvs-users/2005-11/msg00096.html
Signed Off By: Horms <horms@xxxxxxxxxxxx>
diff --git a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c
index f828fa2..c0c9abb 100644
--- a/net/ipv4/ipvs/ip_vs_conn.c
+++ b/net/ipv4/ipvs/ip_vs_conn.c
@@ -525,8 +525,6 @@ static void ip_vs_conn_expire(unsigned l
{
struct ip_vs_conn *cp = (struct ip_vs_conn *)data;
- cp->timeout = 60*HZ;
-
/*
* hey, I'm using it
*/
|