[IPVS]: Update mark->cw in the WRR scheduler while service is updated.
Linux Kernel Mailing List <[email protected]> Thu, 10 Mar 2005 04:37:15 +0000
| Newsgroups | gmane.linux.kernel.commits.2-4 |
|---|---|
| Message-ID | <[email protected]> |
ChangeSet 1.1448.127.3, 2005/03/09 20:37:15-08:00, [email protected] [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 <[email protected]> for finding the WRR problem in kernel 2.6. Signed-off-by: David S. Miller <[email protected]> ip_vs_wrr.c | 2 ++ 1 files changed, 2 insertions(+) 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-03-25 17:03:12 -08:00 +++ b/net/ipv4/ipvs/ip_vs_wrr.c 2005-03-25 17:03:12 -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; }