LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 06-16-2011, 04:03 PM   #1
ngoodnight
LQ Newbie
 
Registered: Jun 2011
Posts: 1

Rep: Reputation: Disabled
Kernel MM replaces pinned physical pages


I have a kernel module that implements mmap and page fault handling. The page fault handler for a mapping returns previously pinned user pages (from get_user_pages) from another mapping.

After my user code faults on all pages in a mapping, I've confirmed that the PTEs point to the correct physical page frames (i.e. those now shared between two VMAs). However, if my user code writes to the VAs again (this time without faults because the the pages are present), the kernel replaces the faulted-in, shared pages with other, seemingly arbitrary physical page frames. I have no idea where these new pages come from.

My question: under what circumstances will the kernel MM decide to blow away a mapping to pinned physical pages and substitute in other physical memory? Could this be a problem with my virtual mapping flags? It seems strange that the page fault path would use the page I return only to replace it later.

Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
KMAP Physical Page to Kernel Virtual Address: unable to handle kernel paging request kickuindajunk Linux - Kernel 6 08-21-2010 12:17 PM
How can I find the actual Virtual -> Physical Memory Map Pages? VorlonInfoTech Linux - General 0 12-23-2008 09:17 AM
how kernel process is loaded in the physical memory.. Kesavaraj Linux - Software 1 07-23-2008 08:53 AM
Synaptic: Cannot unlock pinned packages davcefai Debian 6 01-03-2006 03:47 PM
lisa pinned at 100% KimVette Linux - Networking 0 12-23-2005 07:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration