Re: [PATCH v2] file: reclaim 24 bytes from f_owner

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

 



On Tue, Aug 13, 2024 at 3:02 PM Jeff Layton <jlayton@xxxxxxxxxx> wrote:
>
> On Tue, 2024-08-13 at 14:30 +0200, Christian Brauner wrote:
> > diff --git a/include/linux/fs.h b/include/linux/fs.h
> > index fd34b5755c0b..319c566a9e98 100644
> > --- a/include/linux/fs.h
> > +++ b/include/linux/fs.h
> > @@ -947,6 +947,7 @@ static inline unsigned imajor(const struct inode *inode)
> >  }
> >
> >  struct fown_struct {
> > +     struct file *file;      /* backpointer for security modules */
>
> This struct was 32 bytes before (on x86_64). Now it'll be 40. That's
> fine, but it may be worthwhile to create a dedicated slabcache for this
> now, since it's no longer a power-of-2 size.
>

creating a dedicated slab would be a waste imo

If someone is concerned with memory usage here, I note that plausibly
the file pointer can be plumbed through sigio code, eliding any use of
the newly added ->file

However, a real daredevil would check if the thing to do is perhaps to
add a 48-byte malloc slab. But that would require quite a bit of
looking at allocations elsewhere, collecting stats and whatnot. Noting
this just in case, I have negative interest in looking at this.

-- 
Mateusz Guzik <mjguzik gmail.com>





[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