# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/02/15 15:57:16+08:00 wensong@xxxxxxxxxxxx # [IPVS] update mark->cw in the WRR scheduler while service is updated # # It's for better performance in the WRR scheduling when server weight is adjusted. # The change is ported from the changes of IPVS in kernel 2.6. Thanks must go to # Kees Hoekzema for finding the WRR problem in kernel 2.6. # # # net/ipv4/ipvs/ip_vs_wrr.c # 2005/02/15 15:57:11+08:00 wensong@xxxxxxxxxxxx +2 -0 # reset mark->cw if mark->cw is greater than the maximum weight while updating service # diff -Nru a/net/ipv4/ipvs/ip_vs_wrr.c b/net/ipv4/ipvs/ip_vs_wrr.c --- a/net/ipv4/ipvs/ip_vs_wrr.c 2005-02-15 15:58:17 +08:00 +++ b/net/ipv4/ipvs/ip_vs_wrr.c 2005-02-15 15:58:17 +08:00 @@ -140,6 +140,8 @@ mark->cl = &svc->destinations; mark->mw = ip_vs_wrr_max_weight(svc); mark->di = ip_vs_wrr_gcd_weight(svc); + if (mark->cw > mark->mw) + mark->cw = 0; return 0; }