Summary
Well, what do you know!? Congratulations, you have done it! You have completed this book!
In this chapter, we continued from the previous chapter in our quest to learn more about kernel synchronization. Here, you learned how to perform locking more efficiently and safely on integers, via both the atomic_t
and the newer refcount_t
interfaces. Within this, you learned how the typical RMW sequence can be atomically and safely employed in a common activity for driver authors – updating a device’s registers. The reader-writer spinlock, interesting and conceptually useful, although with several caveats, was then covered. You then saw how easy it is to inadvertently create adverse performance issues caused by unfortunate caching side effects, including looking at the false sharing problem and how to avoid it.
A boon to performance – lock-free algorithms and programming techniques – was then covered in some detail, with a focus on understanding...