[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190715152513.GD1222@redhat.com>
Date: Mon, 15 Jul 2019 17:25:14 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Song Liu <songliubraving@...com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
matthew.wilcox@...cle.com, kirill.shutemov@...ux.intel.com,
peterz@...radead.org, rostedt@...dmis.org, kernel-team@...com,
william.kucharski@...cle.com
Subject: Re: [PATCH v7 2/4] uprobe: use original page when all uprobes are
removed
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.
Powered by blists - more mailing lists