linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Song Liu <songliubraving@fb.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	matthew.wilcox@oracle.com, kirill.shutemov@linux.intel.com,
	peterz@infradead.org, rostedt@goodmis.org, kernel-team@fb.com,
	william.kucharski@oracle.com
Subject: Re: [PATCH v7 2/4] uprobe: use original page when all uprobes are removed
Date: Mon, 15 Jul 2019 17:25:14 +0200	[thread overview]
Message-ID: <20190715152513.GD1222@redhat.com> (raw)
In-Reply-To: <20190625235325.2096441-3-songliubraving@fb.com>

On 06/25, Song Liu wrote:
>
> This patch allows uprobe to use original page when possible (all uprobes
> on the page are already removed).

I can't review. I do not understand vm enough.

> +	if (!is_register) {
> +		struct page *orig_page;
> +		pgoff_t index;
> +
> +		index = vaddr_to_offset(vma, vaddr & PAGE_MASK) >> PAGE_SHIFT;
> +		orig_page = find_get_page(vma->vm_file->f_inode->i_mapping,
> +					  index);
> +
> +		if (orig_page) {
> +			if (pages_identical(new_page, orig_page)) {

Shouldn't we at least check PageUptodate?


and I am a bit surprised there is no simple way to unmap the old page
in this case... 

Oleg.


  parent reply	other threads:[~2019-07-15 15:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25 23:53 [PATCH v7 0/4] THP aware uprobe Song Liu
2019-06-25 23:53 ` [PATCH v7 1/4] mm: move memcmp_pages() and pages_identical() Song Liu
2019-06-25 23:53 ` [PATCH v7 2/4] uprobe: use original page when all uprobes are removed Song Liu
2019-06-26  6:00   ` Srikar Dronamraju
2019-07-15 15:25   ` Oleg Nesterov [this message]
2019-07-24  8:23     ` Song Liu
2019-07-24  8:57       ` Oleg Nesterov
2019-06-25 23:53 ` [PATCH v7 3/4] mm, thp: introduce FOLL_SPLIT_PMD Song Liu
2019-06-25 23:53 ` [PATCH v7 4/4] uprobe: use FOLL_SPLIT_PMD instead of FOLL_SPLIT Song Liu
2019-06-26  6:00   ` Srikar Dronamraju
2019-06-27  6:31     ` Song Liu
2019-06-26  0:03 ` [PATCH v7 0/4] THP aware uprobe Song Liu

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=20190715152513.GD1222@redhat.com \
    --to=oleg@redhat.com \
    --cc=kernel-team@fb.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=matthew.wilcox@oracle.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=songliubraving@fb.com \
    --cc=william.kucharski@oracle.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).