linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Helsley <matthltc@linux.vnet.ibm.com>
To: Pavel Emelyanov <xemul@parallels.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux MM <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/5] pagemap: Introduce the /proc/PID/pagemap2 file
Date: Thu, 2 May 2013 10:08:57 -0700	[thread overview]
Message-ID: <20130502170857.GB24627@us.ibm.com> (raw)
In-Reply-To: <51669EA5.20209@parallels.com>

On Thu, Apr 11, 2013 at 03:29:41PM +0400, Pavel Emelyanov wrote:
> This file is the same as the pagemap one, but shows entries with bits
> 55-60 being zero (reserved for future use). Next patch will occupy one
> of them.

This approach doesn't scale as well as it could. As best I can see
CRIU would do:

for each vma in /proc/<pid>/smaps
	for each page in /proc/<pid>/pagemap2
		if soft dirty bit
			copy page

(possibly with pfn checks to avoid copying the same page mapped in
multiple locations..)

However, if soft dirty bit changes could be queued up (from say the
fault handler and page table ops that map/unmap pages) and accumulated
in something like an interval tree it could be something like:

for each range of changed pages
	for each page in range
		copy page

IOW something that scales with the number of changed pages rather
than the number of mapped pages.

So I wonder if CRIU would abandon pagemap2 in the future for something
like this.

Cheers,
	-Matt Helsley


  parent reply	other threads:[~2013-05-03 22:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11 11:28 [PATCH 0/5] mm: Ability to monitor task memory changes (v3) Pavel Emelyanov
2013-04-11 11:28 ` [PATCH 1/5] clear_refs: Sanitize accepted commands declaration Pavel Emelyanov
2013-04-11 21:17   ` Andrew Morton
2013-04-11 11:29 ` [PATCH 2/5] clear_refs: Introduce private struct for mm_walk Pavel Emelyanov
2013-04-11 11:29 ` [PATCH 3/5] pagemap: Introduce pagemap_entry_t without pmshift bits Pavel Emelyanov
2013-04-11 11:29 ` [PATCH 4/5] pagemap: Introduce the /proc/PID/pagemap2 file Pavel Emelyanov
2013-04-11 21:19   ` Andrew Morton
2013-04-12 13:10     ` Pavel Emelyanov
2013-05-02 17:08   ` Matt Helsley [this message]
2013-05-04  9:47     ` Pavel Emelyanov
2013-04-11 11:30 ` [PATCH 5/5] mm: Soft-dirty bits for user memory changes tracking Pavel Emelyanov
2013-04-11 21:24   ` Andrew Morton
2013-04-12 13:14     ` Pavel Emelyanov
2013-04-15 21:46       ` Andrew Morton
2013-04-15 23:57         ` Stephen Rothwell
2013-04-16 19:58         ` Pavel Emelyanov
2013-04-12 15:53   ` [PATCH 6/5] selftest: Add simple test for soft-dirty bit Pavel Emelyanov
2013-04-16 19:51 ` [PATCH 7/5] mem-soft-dirty: Reshuffle CONFIG_ options to be more Arch-friendly Pavel Emelyanov
2013-04-16 23:24   ` Stephen Rothwell

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=20130502170857.GB24627@us.ibm.com \
    --to=matthltc@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=xemul@parallels.com \
    /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).