[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48fd52be-170f-4807-9717-770f0fb6c88c@lucifer.local>
Date: Wed, 13 Aug 2025 06:35:42 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: tglx@...utronix.de, linux-kernel@...r.kernel.org,
torvalds@...uxfoundation.org, mingo@...nel.org, namhyung@...nel.org,
acme@...hat.com, kees@...nel.org
Subject: Re: [PATCH v3 01/15] perf: Remove redundant condition for AUX buffer
size
On Tue, Aug 12, 2025 at 12:38:59PM +0200, Peter Zijlstra wrote:
> From: Thomas Gleixner <tglx@...utronix.de>
>
> It is already checked whether the VMA size is the same as
> nr_pages * PAGE_SIZE, so later checking both:
>
> aux_size == vma_size && aux_size == nr_pages * PAGE_SIZE
>
> is redundant. Remove the vma_size check as nr_pages is what is actually
> used in the allocation function. That prepares for splitting out the buffer
> allocation into seperate functions, so that only nr_pages needs to be
NIT: still get seperate -> separate typo there. Not a big deal obviously :)
> handed in.
>
> No functional change.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
> Link: https://lkml.kernel.org/r/20250811070620.389961756@linutronix.de
> ---
> kernel/events/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -7043,7 +7043,7 @@ static int perf_mmap(struct file *file,
> if (rb_has_aux(rb) && rb->aux_pgoff != vma->vm_pgoff)
> goto aux_unlock;
>
> - if (aux_size != vma_size || aux_size != nr_pages * PAGE_SIZE)
> + if (aux_size != nr_pages * PAGE_SIZE)
> goto aux_unlock;
>
> /* already mapped with a different size */
>
>
Powered by blists - more mailing lists