kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: parkch98@gmail.com (Park Chan ho)
To: kernelnewbies@lists.kernelnewbies.org
Subject: How to retrieve page pointer from vm_area_struct?
Date: Mon, 18 Apr 2011 01:34:01 +0900	[thread overview]
Message-ID: <BANLkTim1mCV4bm2wtZbgoWsTekYjL7onpA@mail.gmail.com> (raw)

Hi all,
I want to retrieve "struct page" pointer from vm_area_struct.
How do I write code below example?

------------example code------------
struct task_struct *p;
struct vm_area_struct *vma;
struct page *page;

for_each_process(p) {
    if (!p->mm) continue;
    for (vma = p->mm->mmap; vma; vma = vma->vm_next) {
       for (i = vma->vm_start; i < vma->vm_end; i += PAGE_SIZE) {
            /* How to get page pointer? */
            page = ???
       }
    }
}

             reply	other threads:[~2011-04-17 16:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-17 16:34 Park Chan ho [this message]
2011-04-17 19:22 ` How to retrieve page pointer from vm_area_struct? Rajat Sharma

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=BANLkTim1mCV4bm2wtZbgoWsTekYjL7onpA@mail.gmail.com \
    --to=parkch98@gmail.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).