[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240810221507.GI11646@noisy.programming.kicks-ass.net>
Date: Sun, 11 Aug 2024 00:15:07 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: "Matthew Wilcox (Oracle)" <willy@...radead.org>
Cc: Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf: Remove setting of page->index and ->mapping
On Fri, Aug 09, 2024 at 09:10:36PM +0100, Matthew Wilcox (Oracle) wrote:
> I have no idea why perf is setting these fields. There should be
> no need to do this.
Because these are not shared pages and nobody will ever look at these
fields? Yeah, I can't for the life of me remember why I did that.
> Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org>
> ---
> kernel/events/core.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index aa3450bdc227..f55ab04f3df0 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -6221,8 +6221,6 @@ static vm_fault_t perf_mmap_fault(struct vm_fault *vmf)
> goto unlock;
>
> get_page(vmf->page);
> - vmf->page->mapping = vmf->vma->vm_file->f_mapping;
> - vmf->page->index = vmf->pgoff;
>
> ret = 0;
> unlock:
> --
> 2.43.0
>
Powered by blists - more mailing lists