Thread (10 messages) 10 messages, 4 authors, 2014-07-04

Re: [PATCH v2 2/4] mm: introduce fincore()

flat view

From: Naoya Horiguchi <hidden>
Date: 2014-07-04 17:43:17
Also in: linux-mm, lkml

On Fri, Jul 04, 2014 at 05:15:59PM +0200, Cédric Villemain wrote:
Le vendredi 4 juillet 2014 03:12:30 Christoph Hellwig a écrit :
quoted
On Thu, Jul 03, 2014 at 05:52:13PM -0400, Naoya Horiguchi wrote:
quoted
This patch provides a new system call fincore(2), which provides
mincore()- like information, i.e. page residency of a given file.
But unlike mincore(), fincore() has a mode flag which allows us to
extract detailed information about page cache like pfn and page
flag. This kind of information is very helpful, for example when
applications want to know the file cache status to control the IO
on their own way.
It's still a nasty multiplexer for multiple different reporting
formats in a single system call.  How about your really just do a
fincore that mirrors mincore instead of piggybacking exports of
various internal flags (tags and page flags onto it.
We can do it in mincore-compatible way with FINCORE_BMAP mode.
If you choose it, you don't care about any details about other modes.
I don't make no default mode, but if we have a good reason, I'm OK
to set FINCORE_BMAP as default mode.
The fincore à la mincore got some arguments against it too. It seems this 
implementations try (I've not tested nor have a close look yet) to 
answer both concerns : have details and also possible to have 
aggregation function not too expansive.
Correct, that's the motivation of this non-trivial interface.
This could finally obsoletes messy /proc/kpage{flags,count} and/or
/proc/pid/pagemap kind of things, and we will not have to collect
information over all these interfaces (so that's less expensive.)

Thanks,
Naoya Horiguchi

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help