OK, so are doing two kmem_cache_allocs for every new_inode. With the
unbork.fs patch you could save 50% of the kmem_cache_allocs by
rewriting as follows:
static inline ntfs_inode *NTFS_I(struct inode *inode)
{
/* should bug-check to be sure it's really one of ours */
return (ntfs_inode *) &(inode->u);
}
And you just fill in the inode_size field of the file_system_type
declaration. The vfs will then handle all the details of allocating/freeing
inodes and the inode slab cache. (Note that Al seems to think this is the
wrong way of doing it, but hasn't said why he thinks that yet.)
For superblocks - are you sure you want a dedicated slab cache for those? It
seems to me that kmalloc is perfectly appropriate for this, and saves the
code needed to set up, keep track of, and tear down the slab cache.
-- Daniel - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/