From attilio at freebsd.org Mon Jun 2 13:37:31 2008 From: attilio at freebsd.org (Attilio Rao) Date: Mon Jun 2 13:37:41 2008 Subject: [PATCH] back-off algorithm for spinning Message-ID: <3bbf2fe10806020612y68883b00n967f5ee88c15771f@mail.gmail.com> 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: lock_backoff.diff Type: application/octet-stream Size: 6232 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-smp/attachments/20080602/4007731b/lock_backoff.obj