Re: [patch][rfc] fs: shrink struct dentry

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

 



On Mon, Dec 01, 2008 at 12:09:12PM +0100, Andi Kleen wrote:
> Nick Piggin <npiggin@xxxxxxx> writes:
> 
> > Hi,
> > Comments?
> > Thanks,
> > Nick
> >
> > --
> > struct dentry is one of the most critical structures in the kernel. So it's
> > sad to see it going neglected.
> 
> Very nice. But the sad thing is that such optimizations tend to quickly
> bit rot again. At least add big fat comments.

I was tempted to add a "Don't add anything to struct dentry" comment :)


> How does it look like on 32bit hosts?

Actually 32bit does not gain anything from packing d_mounted, but it
does benefit from removing d_cookie, so in that case I just added
another 4 bytes to the inline name length in order to keep it at 128
bytes.

Removing the CONFIG_PROFILING difference is quite nice because the
last thing you want is to try to profile something in the dcache and
find that cache access characteristics change when you enable
oprofile :P


> Since the size is variable depending on word size it might be a 
> good idea to auto adjust inline name length to always give a nice
> end result for slab.

Yeah, well I didn't auto adjust, but I took care to try to make it
good values on each platform.
 

> Also I think with some effort it would be possible to shrink it more.
> But since you already reached cache lines, it would just allow
> to increase inline name length. Ok perhaps it would help more on 32bit.
> 
> Further possibilities to shrink: 
> - Eliminate name.length. It seems of dubious utility
> (in general I'm not sure struct qstr is all that useful)
> - Change some of the children/alias list_heads to hlist_heads. I don't
> think these lists typically need O(1) access to the end.
> - If the maximum mount nest was limited d_mounted could migrate
> into d_flags (that would be probably desparate)

Yeah, well it would always be nice to add more bytes to the name
length... CONFIG_TINY would probably not care about reaching cache
line sizes either, so small systems I'm sure would like to see
savings.

Thanks,
Nick
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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