LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [Patch] Overload flag is not resetting

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Patch] Overload flag is not resetting
Cc: Horms <horms@xxxxxxxxxxxx>
From: Wensong Zhang <wensong@xxxxxxxxxxxx>
Date: Sat, 5 Feb 2005 22:27:05 +0800 (CST)


Hello,

On Fri, 4 Feb 2005, Julian Anastasov wrote:


On Fri, 4 Feb 2005, Horms wrote:

        Can you change WRR on update instead of setting mark->cw to 0,
to clamp it to mw, sort of:

if (mark->cw > mark->mw)
        mark->cw = mark->mw;

        Can this fix a problem where on reducing the max weight
no dests are returned until cw reaches down to mw.

Yes, I am pretty sure that problem would be resolved.
Either with the previous two patches (which both set mark->cw to 0),
or the one below which implements your idea.

        Better move the two lines just before return 0 where mw is
valid.


While applying the patch to ip_vs_wrr_update_svc(), I see that maybe the following is a little bit better. :)

        if (mark->cw > mark->mw)
                mark->cw = 0;

After mark->cw is reset with zero, the server with mark->nw will be picked up for next new request, instead of the server with weight >= (mark->mw - mark->di).

Cheers,

Wensong

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