Messages in this thread | | | Date | Fri, 04 Jan 2013 19:45:06 -0500 | From | Rik van Riel <> | Subject | Re: [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
| |