Re: [PATCH] fs: add fincore(2) (mincore(2) for file descriptors)

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

 



Andy and Chris,

On Sun, Feb 21, 2010 at 11:02:38AM +0800, Andy Isaacson wrote:
> On Tue, Feb 16, 2010 at 10:13:12AM -0800, Chris Frost wrote:
> > Add the fincore() system call. fincore() is mincore() for file descriptors.
> > 
> > The functionality of fincore() can be emulated with an mmap(), mincore(),
> > and munmap(), but this emulation requires more system calls and requires
> > page table modifications. fincore() can provide a significant performance
> > improvement for non-sequential in-core queries.
> 
> In addition to being expensive, mmap/mincore/munmap perturb the VM's
> eviction algorithm -- a page is less likely to be evicted if it's
> mmapped when being considered for eviction.
> 
> I frequently see this happen when using mincore(1) from
> http://bitbucket.org/radii/mincore/ -- "watch mincore -v *.big" while
> *.big are being sequentially read results in a significant number of
> pages remaining in-core, whereas if I only run mincore after the
> sequential read is complete, the large files will be nearly-completely
> out of core (except for the tail of the last file, of course).
> 
> It's very interesting to watch
> % watch --interval=.5 mincore -v *
> 
> while an IO-intensive process is happening, such as mke2fs on a
> filesystem image.
> 
> So, I support the addition of fincore(2) and would use it if it were
> merged.

I'd like to advocate the "pagecache object collections", a ftrace
based alternative:

        http://lkml.org/lkml/2010/2/9/156

Which will provide much more information than fincore(). I'd really
appreciate it if you can join and use the general "pagecache object
collections" facility.

Thanks,
Fengguang

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]