[PATCH v2 1/3] Tunables: Add tunables of spin count for pthread adaptive spin mutex

Florian Weimer fweimer@redhat.com
Mon May 14 07:30:00 GMT 2018


On 05/14/2018 06:03 AM, kemi wrote:

> So, let's set the default value of spin count as 150, and run some benchmark to test it.
> 
> What's your idea?

Picking an arbitrary value for now is good enough, and using benchmarks 
to tune it in the future certainly makes sense.

> Two reasons for keeping the tunables here:
> 1) The overhead of instructions are architecture-specific, so, it is hard or even impossible to have a perfect default value that fits all the architecture well.
> E.g. The pause instruction in the Skylake platform is 10x expensive than before.

If we have particularly good numbers for one architecture, we could 
supply an architecture-specific default.

Thanks,
Florian



More information about the Libc-alpha mailing list