Re: [PATCH v3 1/3] mm: introduce fincore()

2014-07-08 Thread Naoya Horiguchi
On Mon, Jul 07, 2014 at 03:44:22PM -0700, Dave Hansen wrote: On 07/07/2014 02:48 PM, Naoya Horiguchi wrote: On Mon, Jul 07, 2014 at 01:43:31PM -0700, Dave Hansen wrote: The whole FINCORE_PGOFF vs. FINCORE_BMAP issue is something that will come up in practice. We just don't have the

[PATCH v3 1/3] mm: introduce fincore()

2014-07-07 Thread Naoya Horiguchi
This patch provides a new system call fincore(), which extracts mincore()- like information from the kernel, i.e. page residency of a given file. But unlike mincore(), fincore() has a mode flag which allows us to extract more detailed information like pfn and page flag. This kind of information is

Re: [PATCH v3 1/3] mm: introduce fincore()

2014-07-07 Thread Dave Hansen
+/* + * You can control how the buffer in userspace is filled with this mode + * parameters: I agree that we don't have any good mechanisms for looking at the page cache from userspace. I've hacked some things up using mincore() and they weren't pretty, so I welcome _something_ like this.

Re: [PATCH v3 1/3] mm: introduce fincore()

2014-07-07 Thread Naoya Horiguchi
Hi Dave, Thank you for the comments. On Mon, Jul 07, 2014 at 12:01:41PM -0700, Dave Hansen wrote: +/* + * You can control how the buffer in userspace is filled with this mode + * parameters: I agree that we don't have any good mechanisms for looking at the page cache from userspace.

Re: [PATCH v3 1/3] mm: introduce fincore()

2014-07-07 Thread Dave Hansen
On 07/07/2014 01:21 PM, Naoya Horiguchi wrote: On Mon, Jul 07, 2014 at 12:01:41PM -0700, Dave Hansen wrote: But, is this trying to do too many things at once? Do we have solid use cases spelled out for each of these modes? Have we thought out how they will be used in practice?