Re: [PATCH] continous statistics

From: Krzysztof Oledzki <ole#ans.pl>
Date: Mon, 26 Nov 2007 20:58:27 +0100 (CET)

On Mon, 26 Nov 2007, Willy Tarreau wrote:

> Hi Krzysztof !
>
> On Sat, Nov 24, 2007 at 10:16:49PM +0100, Krzysztof Oledzki wrote:
>>> From baff40f9c50af1f62ff02d8c8269bd6a23157717 Mon Sep 17 00:00:00 2001
>> From: Krzysztof Piotr Oledzki <ole#ans.pl>
>> Date: Sat, 24 Nov 2007 22:12:47 +0100
>> Subject: [MEDIUM] continous statistics
>
> Thanks, I've merged your patch. BTW, thanks for having updated the doc!
You're welcome!

> I tried again, and it's working fine.

OK. ;)

> Also, as I never trust gcc's code on 64-bit data, I took a look at what
> it produced for session_process_counters, and (as expected), it clearly
> was suboptimal. The problem is always the same: gcc knows very few things
> when optimizing 64-bit for a 32-bit platform. For instance, it does not
> know that a == b if (a - b) == 0.
>
> So after merging your patch, I slightly tweaked the code to help gcc, and
> by a single small trick, the function above went down from 318 bytes to 220
> bytes, the difference relying in data passing from register to reg/memory,
> and useless comparisons and value reloading.
>
> I measured a net gain of almost 2% using this change, which I cannot attribute
> to this code alone, so I think that it simply changed some other function's
> alignment resulting in this difference.
>
> I've attached the patch for your convenience.

Very nice, thank you. This hint about 64-bit @ 32-bit platform is very useful, I must check it on my projects. BTW: does it affect all gcc versions, even 4.1/4.2?

> For your info, I finally managed to merge the dynamic weights code. It was
> kind of hard, the initial code looked like a mine field! But now it works
> (I added a quick and dirty patch to change a server's weight on the fly to
> verify this). I'm currently merging the branches back to master. The changes
> are not yet well documented, but they only affect developpers. I still have
> two features to implement this week (slowstart and server maintenance mode)
> and I'll be able to release 1.3.14 with all of this.
>
> I'll keep you updated about this.

Thanks. Is there a EAT defined for 1.3.14? I have two half-ready patches but I'm not sure if I manage to finish them this week.

Best regards,

                         Krzysztof Olędzki Received on 2007/11/26 20:58

This archive was generated by hypermail 2.2.0 : 2007/11/26 21:45 CET