From: Andrew Morton <akpm@digeo.com>
To: bert hubert <ahu@ds9a.nl>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Ingo Molnar <mingo@elte.hu>
Subject: Re: vm scenario tool / mincore(2) functionality for regular pages?
Date: Tue, 22 Oct 2002 13:58:36 -0700 [thread overview]
Message-ID: <3DB5BBFC.479BE5DD@digeo.com> (raw)
In-Reply-To: <20021022184313.GA12081@outpost.ds9a.nl>
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, 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/
next prev parent reply other threads:[~2002-10-22 20:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-22 18:43 bert hubert
2002-10-22 20:58 ` Andrew Morton [this message]
2002-10-22 22:23 ` bert hubert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DB5BBFC.479BE5DD@digeo.com \
--to=akpm@digeo.com \
--cc=ahu@ds9a.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox