Re: [DISCUSSION] Revisiting Slab Movable Objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 25, 2025 at 1:09 PM Harry Yoo <harry.yoo@xxxxxxxxxx> wrote:
> On Tue, Apr 22, 2025 at 07:54:08AM +1000, Dave Chinner wrote:
> > On Mon, Apr 21, 2025 at 10:47:39PM +0900, Harry Yoo wrote:
> > > Hi folks,
> > >
> > > As a long term project, I'm starting to look into resurrecting
> > > Slab Movable Objects. The goal is to make certain types of slab memory
> > > movable and thus enable targeted reclamation, migration, and
> > > defragmentation.
> > >
> > > The main purpose of this posting is to briefly review what's been tried
> > > in the past, ask people why prior efforts have stalled (due to lack of
> > > time or insufficient justification for additional complexity?),
> > > and discuss what's feasible today.
> > >
> > > Please add anyone I may have missed to Cc. :)
> >
> > Adding -fsdevel because dentry/inode cache discussion needs to be
> > visible to all the fs/VFS developers.
> >
> > I'm going to cut straight to the chase here, but I'll leave the rest
> > of the original email quoted below for -fsdevel readers.
> >
> > > Previous Work on Slab Movable Objects
> > > =====================================
> >
> > <snip>
> >
> > Without including any sort of viable proposal for dentry/inode
> > relocation (i.e. the showstopper for past attempts), what is the
> > point of trying to ressurect this?
>
> Migrating slabs still makes sense for other objects such as xarray / maple
> tree nodes, and VMAs.

Do we have examples of how much memory is actually wasted on
sparsely-used slabs, and which slabs this happens in, from some real
workloads?

If sparsely-used slabs are a sufficiently big problem, maybe another
big hammer we have is to use smaller slab pages, or something along
those lines? Though of course a straightforward implementation of that
would probably have negative effects on the performance of SLUB
fastpaths, and depending on object size it might waste more memory on
padding.

(An adventurous idea would be to try to align kmem_cache::size such
that objects start at some subpage boundaries of SLUB folios, and then
figure out a way to shatter SLUB folios into smaller folios at runtime
while they contain objects... but getting the SLUB locking right for
that without slowing down the fastpath for freeing an object would
probably be a large pain.)





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux