[lvs-users] Source Hashing scheduling module

Mikio Kishi mkishi at 104.net
Sat Jul 11 17:16:10 BST 2009


Hi, all

ip_vs_sh.c#ip_vs_sh_schedule() returns NULL if dest->weight becomes 0.

> // ip_vs_sh.c
>
>static struct ip_vs_dest *
>ip_vs_sh_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
>{
>        ... snip ...
>        tbl = (struct ip_vs_sh_bucket *)svc->sched_data;
>        dest = ip_vs_sh_get(tbl, iph->saddr);
>        if (!dest
>            || !(dest->flags & IP_VS_DEST_F_AVAILABLE)
>            || atomic_read(&dest->weight) <= 0
>            || is_overloaded(dest)) {
>                return NULL;
>        }
>        ... snip ...
>        return dest;
>}

I hope that the sh scheduling module doesn't select target server whose
weight is 0, like lc, sed.

what do you think ?

- Environment
  linux-2.6.28.9

Sincerely,
--
Mikio Kishi




More information about the lvs-users mailing list