From: Mauricio Lin <mauriciolin@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: How to identify cow (copy-on-write) pages during kernel execution?
Date: Mon, 20 Jun 2005 01:45:04 -0400 [thread overview]
Message-ID: <3f250c7105061922454dfe31ed@mail.gmail.com> (raw)
Hi all,
I would like to know if there is a way to identify
struct page that is cow (copy-on-write).
The way I figured out to identify cow pages is when
copy-on-write happens. I mean I identify cow pages
inside the do_wp_page(), the function that handles
copy-on-write. I have checked do_no_page() as well.
I have included a field (is_cow) in the struct page to
identify cow page.
struct page {
...
atomic_t is_cow;
}
But I wonder if it is possible to identify cow pages
before copy-on-write happens. So identify cow pages in
advance before any process tries to write to a cow
page.
I have checked the do_fork(), copy_process() and
copy_mm() function to try to identify cow pages during
the process creation, but no success. In copy_mm(),
just the mm (of current process) is provided to the
child process, but there are no references to struct
pages related to mm and its VMAs.
So when a page struct is considered a cow in the
kernel and its count variable is updated? Certainly
the counter page (page->_count) is updated when a page
is shared because of copy-on-write feature.
How can I identify cow pages when it becomes cow? Is
there any feasible way to perform that?
BR,
Mauricio Lin.
next reply other threads:[~2005-06-20 5:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-20 5:45 Mauricio Lin [this message]
2005-06-20 6:33 ` How to identify cow (copy-on-write) pages during kernel execution? Nick Piggin
2005-06-20 11:09 ` Carsten Otte
2005-06-20 11:30 ` Mauricio Lin
2005-06-20 11:35 ` Carsten Otte
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=3f250c7105061922454dfe31ed@mail.gmail.com \
--to=mauriciolin@gmail.com \
--cc=linux-kernel@vger.kernel.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