Re: [RFC PATCH v10 6/6] netfs: Change netfs_inode_init to allocate memory to allow opt-in

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

 



Dave Wysochanski <dwysocha@xxxxxxxxxx> wrote:

> This saves memory for network filesystems inode that would build
> in netfs support, but like to opt-in to netfs on some mounts while
> opting-out of netfs on other mounts.
> ...
>  static struct inode *afs_alloc_inode(struct super_block *sb)
>  {
>  	struct afs_vnode *vnode;
> +	int	ret;
>  
>  	vnode = alloc_inode_sb(sb, afs_inode_cachep, GFP_KERNEL);
>  	if (!vnode)
>  		return NULL;
>  
> +	ret = netfs_inode_init(&vnode->netfs, &afs_req_ops);
> +	if (ret) {
> +		afs_free_inode(AFS_VNODE_TO_I(vnode));
> +		return NULL;
> +	}
>  	atomic_inc(&afs_count_active_inodes);
>  
>  	/* Reset anything that shouldn't leak from one inode to the next. */

This makes the memory footprint worse for 9p, afs, ceph and cifs - and adds a
time penalty to inode creation and destruction as well (though probably not a
huge amount).

David
--
Linux-cachefs mailing list
Linux-cachefs@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/linux-cachefs




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]
  Powered by Linux