Quantcast

[PATCH] back-off algorithm for spinning

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[PATCH] back-off algorithm for spinning

Attilio Rao-2
The attached patch implements a back-off algorithm for adaptive
spinning in order to reduce cache traffics in big SMP environments.
I really need to tune values (CAP and SHIFT) on a big SMP machine
(16/32 ways possibily) and currently I have no-one available.

Some tips:
- uint32_t has been choosen for the back-off counters as we want a
fixed size because we want to have a deterministic size for words
- Possibily, in the spinlock case, the loop for the first number of
loop counting can be reduced now, but we still need to maintain the
same difference between this and the later value for determining
"spinlock held too long".

Revisions are appreciated.

Thanks,
Attilio


--
Peace can only be achieved by understanding - A. Einstein

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-smp
To unsubscribe, send any mail to "[hidden email]"

lock_backoff.diff (8K) Download Attachment
Loading...