Re: [profile] amortize atomic hit count increments

William Lee Irwin III
2004-09-14T15:55:56Z

On Mon, Sep 13, 2004 at 09:47:48PM -0700, William Lee Irwin III wrote:
>> timer interrupt, usually at boot. The following patch attempts to
>> amortize the atomic operations done on the profile buffer to address
>> this stability concern. This patch has nothing to do with performance;

On Tue, Sep 14, 2004 at 01:34:19PM +0200, Andrea Arcangeli wrote:
> isn't it *much* simpler and much more efficient to just have a per-cpu
> idle function? I seriously doubt you'll get simultaneous collisions on
> anything but the 'halt' instruction in the idle function.

Sampling the profile buffer at regular intervals shows far less than
256 distinct functions hit in 1s intervals even with all cpus busy. As
for whether that would be sufficient, that will have to be answered by
those who reported the bug. I suppose to test whether things besides
idling do cause this problem, one would boot with a restricted
prof_cpu_mask, load all cpus on the machine, set the prof_cpu_mask to
unrestricted, and see if it livelocks before the load terminates.

-- wli