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
|