From: michaelbest002@126.com (秦弋戈)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Why page fault handler behaved this way? Please help!
Date: Thu, 30 Oct 2014 15:10:52 +0800 (CST) [thread overview]
Message-ID: <771b3575.1fa3f.1495fe48476.Coremail.michaelbest002@126.com> (raw)
Dear all,
I am a kernel newbie who want's to learn more about memory management. Recently I'm doing some experiment on page fault handler. There happened something that I couldn't understand.
>From reading the book Understanding the Linux Kernel, I know that the kernel loads a page as late as possible. It's only happened when the program has to reference??(read, write, or execute)?a page yet the page is not in memory.
However, when I traced all page faults in my test program, I found something strange. My test program is large enough, but there are only two page faults triggered in the code segment of the program, while most of the faults are not in code segment.
At first I thought that perhaps the page is not the normal 4K page. Thus I turned off the PAE support in the config file. But the log remains unchanged.
So why are there only 2 page faults in code segment? It shouldn't be like this in my opinion. Please help me.
The attachment is my kernel log. Limited by the mail size, I couldn't upload my program, but I believe that the log is clear enough.
Thank you very much.
Best regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kernel_log
Type: application/octet-stream
Size: 20722 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20141030/52d3469a/attachment-0001.obj
next reply other threads:[~2014-10-30 7:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-30 7:10 秦弋戈 [this message]
2014-11-04 12:41 ` Why page fault handler behaved this way? Please help! Mulyadi Santosa
2014-11-04 13:13 ` Kirill A. Shutemov
2014-11-05 8:18 ` 秦弋戈
2014-11-05 14:58 ` Kirill A. Shutemov
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=771b3575.1fa3f.1495fe48476.Coremail.michaelbest002@126.com \
--to=michaelbest002@126.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/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;
as well as URLs for NNTP newsgroup(s).