LWN.net Logo

Adaptive spinning futex implementation

Adaptive spinning futex implementation

Posted May 17, 2010 17:10 UTC (Mon) by dvhart (guest, #19636)
In reply to: Adaptive spinning futex implementation by vomlehn
Parent article: Adaptive spinning futexes

In your 2.4 implementation, you allocated the memory in userspace and then told the kernel where it was? Along the same lines as SET_TID_ADDRESS(2)? Did you also pin this memory?


(Log in to post comments)

Adaptive spinning futex implementation

Posted May 18, 2010 1:45 UTC (Tue) by vomlehn (subscriber, #45588) [Link]

Yes, you allocated the memory anyway you wanted, but using shared memory reduced the amount of work the kernel had to do because it could update the process' states in only one place. Plus you needed shared memory for the spinlock part anyway. You're right about pinning the memory, too. We updated the state in the scheduler, so you couldn't go to sleep while the memory was paged in.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds