LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [PATCH] Invalidate expired persistance templates

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH] Invalidate expired persistance templates
Cc: Julian Anastasov <ja@xxxxxx>
Cc: Horms <horms@xxxxxxxxxxxx>
From: Roberto Nibali <ratz@xxxxxx>
Date: Mon, 05 Dec 2005 15:14:21 +0100
Zdrave Julian,

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,

Every app.

we return to your initial offer and my first answer, we can not
invalidate template for all users.

We won't, unless I misunderstand the patch completely. Resetting the template to some hardcoded value although we have no controlled connection anymore is what we're trying to fix.

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.

ITYM: 1. But this could be added as an additional part, if n_control isn't already 1 in our case.

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);

And invalidate_expired_template would be cp->flags & IP_VS_CONN_F_TEMPLATE?

Hmm, getting confused again, sorry.

Cheers,
Roberto Nibali, ratz
--
-------------------------------------------------------------
addr://Kasinostrasse 30, CH-5001 Aarau tel://++41 62 823 9355
http://www.terreactive.com             fax://++41 62 823 9356
-------------------------------------------------------------
terreActive AG                       Wir sichern Ihren Erfolg
-------------------------------------------------------------

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