Skip to content

RFC Shrinking rwsem

Matthew Wilcox (Oracle) linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest1 patch 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1rwsem: Shrink rwsem by one pointerinclude/linux/rwsem.h kernel/locking/rwsem.c+59 -239 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/1] Shrinking rwsem

Some of Christoph's recent work has pointed out that we're achingly close to being able to squeeze one more inode into each slab [1]. There are currently three rwsems embedded in struct inode -- invalidate_lock, i_mmap_rwsem and i_rwsem, so this saves us 24 bytes. Of course, it'll shrink a lot of other data structures that embed an rwsem (anon_vma and mm_struct come to mind).

We can do the same trick to struct mutex, but I thought I'd send this out to see how people feel about the extra code complexity to make these savings before investing any effort in doing that.

Maybe the performance bots will come back with some numbers, although they've been weirdly sensitive to rwsem alignment in the past, so I'm not sure I'd believe their numbers.

[1] https://lore.kernel.org/linux-fsdevel/[email protected]/

Matthew Wilcox (Oracle) (1):
rwsem: Shrink rwsem by one pointer

 include/linux/rwsem.h  |  8 ++---
 kernel/locking/rwsem.c | 74 +++++++++++++++++++++++++++++++-----------
 2 files changed, 59 insertions(+), 23 deletions(-)
Signature · 1 line
2.47.3