lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 20 Feb 2010 19:02:38 -0800
From:	Andy Isaacson <adi@...apodia.org>
To:	Chris Frost <chris@...stnet.net>
Cc:	Andi Kleen <andi@...stfloor.org>,
	Wu Fengguang <fengguang.wu@...el.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Benny Halevy <bhalevy@...asas.com>, Andrew@...stfloor.org,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	Steve VanDeBogart <vandebo-lkml@...dbox.net>,
	linux-fsdevel@...r.kernel.org, Matt Mackall <mpm@...enic.com>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] fs: add fincore(2) (mincore(2) for file descriptors)

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.

-andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ