Re: [PATCH v2 0/5] add new ioctls to do metadata readahead in btrfs

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

 



On Wed, 2011-01-05 at 00:14 +0800, Jeff Moyer wrote:
> Shaohua Li <shaohua.li@xxxxxxxxx> writes:
> 
> > Hi,
> >   We have file readahead to do asyn file read, but has no metadata
> > readahead. For a list of files, their metadata is stored in fragmented
> > disk space and metadata read is a sync operation, which impacts the
> > efficiency of readahead much. The patches try to add meatadata readahead
> > for btrfs.
> >   In btrfs, metadata is stored in btree_inode. Ideally, if we could hook
> > the inode to a fd so we could use existing syscalls (readahead, mincore
> > or upcoming fincore) to do readahead, but the inode is hidden, there is
> > no easy way for this from my understanding. So we add two ioctls for
> > this. One is like readahead syscall, the other is like micore/fincore
> > syscall.
> >   Under a harddisk based netbook with Meego, the metadata readahead
> > reduced about 3.5s boot time in average from total 16s.
> >   Last time I posted similar patches to btrfs maillist, which adds the
> > new ioctls in btrfs specific ioctl code. But Christoph Hellwig asks we
> > have a generic interface to do this so other filesystem can share some
> > code, so I came up with the new one. Comments and suggestions are
> > welcome!
> 
> Is it not possible to enhance the existing readahead mechanisms to work
> on metadata as well? 
using existing sys_readahead to do metadata readahead? The problem is I
can't hook a fd for meatadata inode, as explained above.
or let kernel automatically do metadata readahead? Kernel can't be so
intelligent, because kernel doesn't even know which file should be
readahead till userspace tells it

>  Is there some reason why metadata should be
> fetched separately from the data it references?
metadata read is sync operation, which will break data readahead
pipeline. And metadata and data usually lives in not adjacent disk
blocks, which will introduce a lot of disk seeks. reading metadata first
and then do data readahead can reduce a lot of disk seeks and data
readahead can be fully pumped

Thanks,
Shaohua

--
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