[$] The seqcount latch lock type

Post Syndicated from original https://lwn.net/Articles/831540/rss

The kernel contains a wide variety of locking primitives; it can be hard to
stay on top of all of them. So even veteran kernel developers might be
forgiven for being unaware of the “seqcount latch” lock type or its use.
While this lock type has existed in the kernel for several years, it is
only being formalized with a proper type declaration in 5.10. So this
seems like a good time to look at what these locks are and how
they work.