LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [PATCH-2.4] fix locking in est scheduler

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH-2.4] fix locking in est scheduler
From: Roberto Nibali <ratz@xxxxxxxxxxxx>
Date: Tue, 01 Jul 2003 08:27:36 +0200
Hello Wensong,

I do, because there is some changes accumulated in my ipvs-1.0 tree.

Ok.

Well, maybe you need read the wrr code for the algorithm. ;) After weight
is introduced, the algorithm is a little bit complicated. Servers with
higher weights receive new and get more jobs than servers with lower
weights. Servers with equal weights get an equal distribution of new jobs.

I see the cw, mw, di relation now and the added complexity. The update_service() callback is called for every destination addition from user space which in case of the wrr scheduler will update the max weight, correct? Quite intelligent :)

Why do we keep the struct iphdr *iph as second parameter in ip_vs_{w}rr_schedule()?

Much faster :) :)

:) Maybe I miss something in the assemble code of gcd_new, where is the mod (%) operation?

Ohh shouwt!! Forgot half of the assembly. Well, it's just reducing the stack usage anyway and it's not that this function would be called on a jiffy basis :):

gcd_lvs:
        pushl   %ebp
        movl    %esp, %ebp
        pushl   %esi
        pushl   %ebx
        subl    $4, %esp
        movl    8(%ebp), %ebx
        movl    12(%ebp), %esi
        movl    %ebx, %eax
        cltd
        idivl   %esi
        testl   %edx, %edx
        movl    %edx, %ecx
        je      .L7
        .p2align 4,,15
.L5:
        movl    %esi, %ebx
        movl    %ecx, %esi
        movl    %ebx, %eax
        cltd
        idivl   %ecx
        testl   %edx, %edx
        movl    %edx, %ecx
        jne     .L5
.L7:
        popl    %edx
        movl    %esi, %eax
        popl    %ebx
        popl    %esi
        popl    %ebp
        ret
gcd_new:
        pushl   %ebp
        movl    %esp, %ebp
        pushl   %ebx
        subl    $4, %esp
        movl    12(%ebp), %ebx
        movl    8(%ebp), %ecx
        testl   %ebx, %ebx
        jle     .L14
        .p2align 4,,15
.L12:
        movl    %ecx, %eax
        cltd
        idivl   %ebx
        movl    %edx, %ecx
        xchgl   %ebx, %ecx
        testl   %ebx, %ebx
        jg      .L12
.L14:
        movl    %ecx, %eax
        popl    %ecx
        popl    %ebx
        popl    %ebp
        ret

Cheers,
Roberto Nibali, ratz
--
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq'|dc

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