lkml.org 
[lkml]   [2013]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 3/5] x86,smp: auto tune spinlock backoff delay factor
On 01/03/2013 12:17 PM, Rik van Riel wrote:

>>> + if (!(head % 7) && delay < MAX_SPINLOCK_DELAY)
>>> + delay++;
>>> +
>>> + loops = delay * waiters_ahead;
>>
>> I don't like the head % 7 thing. I think using fixed point arithmetic
>> would be nicer:
>>
>> if (delay < MAX_SPINLOCK_DELAY)
>> delay += 256/7; /* Or whatever constant we choose */
>>
>> loops = (delay * waiter_ahead) >> 8;
>
> I'll do that. That could get completely rid of any artifacts
> caused by incrementing sometimes, and not other times.
>
>> Also, we should probably skip the delay increment on the first loop
>> iteration - after all, we haven't waited yet, so we can't say that the
>> delay was too short.
>
> Good point. I will do that.

> I will build a kernel with the things you pointed out fixed,
> and will give it a spin this afternoon.
>
> Expect new patches soonish :)

After implementing all the ideas you came up with, which made
perfect sense to me, the code performs significantly worse
than before.

*sigh*

New patches will be coming ... later.

--
All rights reversed


\
 
 \ /
  Last update: 2013-01-05 02:21    [W:0.119 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site