Re: dynamic-hz

From: Con Kolivas
Date: Sun Dec 12 2004 - 18:38:29 EST


Andrea Arcangeli wrote:
On Sun, Dec 12, 2004 at 05:35:47PM +0100, Pavel Machek wrote:

It certainly helps with singing capacitors... What is overhead of


;)


this?


The overhead is a single l1 cacheline in the paths manipulating HZ
(rather than having an immediate value hardcoded in the asm, it reads it
from a memory location not in the icache). Plus there are some
conversion routines in the USER_HZ usages. It's not a measurable
difference.

Just being devils advocate here...

I had variable Hz in my tree for a while and found there was one solitary purpose to setting Hz to 100; to silence cheap capacitors.

The rest of my users that were setting Hz to 100 for so-called performance gains were doing so under the false impression that cpu usage was lower simply because of the woefully inaccurate cpu usage calcuation at 100Hz.

The performance benefit, if any, is often lost in noise during benchmarks and when there, is less than 1%. So I was wondering if you had some specific advantage in mind for this patch? Is there some arch-specific advantage? I can certainly envision disadvantages to lower Hz.

Cheers,
Con

Attachment: signature.asc
Description: OpenPGP digital signature