LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [PATCH] Invalidate expired persistance templates

To: Horms <horms@xxxxxxxxxxxx>
Subject: Re: [PATCH] Invalidate expired persistance templates
Cc: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
From: Julian Anastasov <ja@xxxxxx>
Date: Mon, 5 Dec 2005 11:12:21 +0200 (EET)
        Hello,

On Mon, 5 Dec 2005, Horms wrote:

> Ok, I've had a bit more of a think about this problem.
> It seems to me that the real desire is that once a persistance
> template expires, it shouldn't be used any more. It might
> have to hang around for a bit because of controlled connections,
> but it shouldn't be used for new connections.

        Very strange, for what app they want this behavior? I think,
we return to your initial offer and my first answer, we can not
invalidate template for all users. 3 seconds is very low value,
it can create load. Better one to call ip_vs_conn_expire_now for ct
when its n_control reaches 0, eg. in ip_vs_control_del. As for
IP_VS_CONN_F_EXPIRED I think ip_vs_invalidate_hashed_template is
more suitable. You can call it depending on some flag for the users
that want it, for example:

--- ip_vs_conn.c.old    2005-12-05 10:54:19.019478088 +0200
+++ ip_vs_conn.c        2005-12-05 11:05:09.456596616 +0200
@@ -525,7 +525,10 @@
 {
        struct ip_vs_conn *cp = (struct ip_vs_conn *)data;

-       cp->timeout = 60*HZ;
+       if (cp->flags & IP_VS_CONN_F_TEMPLATE) {
+               if (invalidate_expired_template)
+                       ip_vs_invalidate_hashed_template(cp);
+       }

        /*
         *      hey, I'm using it

--- ip_vs.h.old 2005-12-05 11:02:40.627222120 +0200
+++ ip_vs.h     2005-12-05 11:04:45.011312864 +0200
@@ -792,6 +792,8 @@
                          NIPQUAD(cp->vaddr),ntohs(cp->vport));
                return;
        }
+       if (invalidate_expired_template && atomic_read(&ctl_cp->n_control) == 1)
+               ip_vs_conn_expire_now(ctl_cp);
        atomic_dec(&ctl_cp->n_control);
 }


Regards

--
Julian Anastasov <ja@xxxxxx>

<Prev in Thread] Current Thread [Next in Thread>