I'd pondered that a bit as I was writing the article. It would be painful.
If you move the lock out of the structure it is protecting, you have to allocate it in a separate step. The allocation could maybe be hidden in spin_lock_init(), but the freeing would require explicit action (in vast numbers of call sites) or some severe magic. Probably don't want to do that.
Regardless of whether the lock is relocated or not, the only way to avoid cache problems with surrounding data is to expand the lock to fill an entire cache line. That would bloat spinlocks considerably, and there are a lot of spinlocks in a running kernel. That overhead would hurt; among other things, the bloat, alone, would slow things by causing additional cache utilization.
Maybe I'm missing something (I often do), but, from what I can tell, trying to isolate the locks isn't really a viable solution.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds