lkml.org 
[lkml]   [2002]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: vm scenario tool / mincore(2) functionality for regular pages?
bert hubert wrote:
>
> I'm building a tool to subject the VM to different scenarios and I'd like to
> be able to determine if a page is swapped out or not. For a file I can
> easily determine if a page is in memory (in the page cache) or not using the
> mincore(2) system call.
>
> I want to expand my tool so it can investigate which of its pages are
> swapped out under cache pressure or real memory pressure.
>
> However, to do this, I need a way to determine if a page is there or if it
> is swapped out. My two questions are:
>
> 1) is there an existing way to do this
> (the kernel obviously knows)
>
> 2) would it be correct to expand mincore to also work on
> non-filebacked memory so it works for 'swap-backed' memory too?
>

mincore needs to be taught to walk pagetables and to look up
stuff in swapcache.

Also it currently assumes that vma->vm_file is mapped linearly,
so it will return incorrect results with Ingo's nonlinear mapping
extensions.

But if we were to use Ingo's "file pte's" for all mmappings, mincore
only needs to do the pte->pagecache lookup, so it can lose the
"vma is linear" arithmetic.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.050 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site