From: Will Deacon <will@kernel.org>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, catalin.marinas@arm.com,
mark.rutland@arm.com, Mark Brown <broonie@kernel.org>,
James Clark <james.clark@arm.com>, Rob Herring <robh@kernel.org>,
Marc Zyngier <maz@kernel.org>,
Suzuki Poulose <suzuki.poulose@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
linux-perf-users@vger.kernel.org
Subject: Re: [PATCH V13 - RESEND 00/10] arm64/perf: Enable branch stack sampling
Date: Mon, 31 Jul 2023 14:05:39 +0100 [thread overview]
Message-ID: <20230731130538.GA24881@willie-the-truck> (raw)
In-Reply-To: <20230711082455.215983-1-anshuman.khandual@arm.com>
Hi Anshuman,
On Tue, Jul 11, 2023 at 01:54:45PM +0530, Anshuman Khandual wrote:
> This series enables perf branch stack sampling support on arm64 platform
> via a new arch feature called Branch Record Buffer Extension (BRBE). All
> relevant register definitions could be accessed here.
>
> https://developer.arm.com/documentation/ddi0601/2021-12/AArch64-Registers
>
> This series applies on 6.5-rc1.
>
> Changes in V13:
I had a go at reviewing this series and, aside from the macro issue I've
already pointed out, I really struggled with the way that you've put the
series together:
- You incrementally introduce dead code, forcing the reviewer to keep
previous patches in their head awaiting for a caller to come along
later.
Example: Patch 4 literally just adds a new struct to the kernel.
- You change arch/arm/, where this driver shouldn't even be _compiled_
despite adding CONFIG_ARM64_BRBE.
Example: Patch 5 adds some BRBE stubs to
arch/arm/include/asm/arm_pmuv3.h
- You undo/rework code that was introduced earlier in the series
Example: armv8pmu_branch_read() is introduced as a useless stub in
patch 5, rewritten in patch 6 and then rewritten again in
patch 10. Why should I waste time reviewing three versions
of this function?
- You make unrelated cosmetic changes to the existing code inside
patches adding new features.
Example: Patch 5 randomly removes some comments from the existing
code.
- The commit messages are, at best, useless and err more on the side
of nonsensical.
Example: Look at patch 3:
| This updates 'struct arm_pmu' for branch stack sampling support being added
| later. This adds an element 'reg_trbidr' to capture BRBE attribute details.
| These updates here will help in tracking any branch stack sampling support.
|
| This also enables perf branch stack sampling event on all 'struct arm pmu',
| supporting the feature but after removing the current gate that blocks such
| events unconditionally in armpmu_event_init(). Instead a quick probe can be
| initiated via arm_pmu->has_branch_stack to ascertain the support.
If I remove everything that isn't just describing the code, I'm left with:
- 'reg_trbidr' captures BRBE attribute details
- These updates here will help in tracking any branch stack sampling support.
- perf branch stack sampling event is now enabled when it is supported
- Probing is quick
But crucial information is missing:
* What is BRBE?
* What is a BRBE attribute?
* How are the details of an attribute captured?
* How do these "updates" (which ones?) help in tracking branch stack sampling?
* What is being tracked and why?
* How quick is the probing and why do we care?
* What is the perf branch stack sampling event and what does it mean
to enable it? Does it offer something useful to the user?
* Why do we want any of this?
(these examples are not intended to be an exhaustive list of things that
need fixing)
Overall, this makes the code needlessly difficult to review. However, I
don't reckon it's too much effort on your side to fix the things above.
You've been doing this for long enough (on the author and reviewer side)
that I hope you see what I'm getting at. If not, try reviewing your own
patches right before you hit 'git send-email'; I pretty much always find
a problem with my own code that way.
So, please, can you post a v14 which:
1. Fixes the broken register access macros
2. Adds some meaningful tests at the end of the series
3. Squashes the new driver code (i.e. at least everything in
arm_brbe.c and possibly just everything under drivers/perf/) down
into a single patch
4. Does any _necessary_ cleanup or refactoring at the start of the
series, leaving out cosmetic stuff for now
5. Rewrites the commit messages following the guidelines in
submitting-patches.rst. You don't need to talk about specific C
expressions; we have the code for that already and if it's doing
something subtle then you can add a comment.
6. Resolves the open CYCLES_COUNT issue from Yang and Suzuki
Cheers,
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-07-31 13:07 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 8:24 [PATCH V13 - RESEND 00/10] arm64/perf: Enable branch stack sampling Anshuman Khandual
2023-07-11 8:24 ` [PATCH V13 - RESEND 01/10] drivers: perf: arm_pmu: Add new sched_task() callback Anshuman Khandual
2023-08-10 5:05 ` Anshuman Khandual
2023-08-10 9:41 ` Will Deacon
2023-08-10 11:49 ` Anshuman Khandual
2023-07-11 8:24 ` [PATCH V13 - RESEND 02/10] arm64/perf: Add BRBE registers and fields Anshuman Khandual
2023-07-28 16:20 ` Will Deacon
2023-07-28 16:52 ` James Clark
2023-07-31 2:33 ` Anshuman Khandual
2023-07-31 8:07 ` James Clark
2023-07-31 9:06 ` Mark Rutland
2023-07-31 12:19 ` Anshuman Khandual
2023-08-15 10:17 ` James Clark
2023-08-15 13:05 ` Mark Rutland
2023-08-15 20:35 ` Peter Zijlstra
2023-07-11 8:24 ` [PATCH V13 - RESEND 03/10] arm64/perf: Add branch stack support in struct arm_pmu Anshuman Khandual
2023-07-11 8:24 ` [PATCH V13 - RESEND 04/10] arm64/perf: Add branch stack support in struct pmu_hw_events Anshuman Khandual
2023-07-11 8:24 ` [PATCH V13 - RESEND 05/10] arm64/perf: Add branch stack support in ARMV8 PMU Anshuman Khandual
2023-07-11 8:24 ` [PATCH V13 - RESEND 06/10] arm64/perf: Enable branch stack events via FEAT_BRBE Anshuman Khandual
2023-07-11 19:26 ` Randy Dunlap
2023-07-12 2:42 ` Anshuman Khandual
[not found] ` <5c7c1ff3-1e2a-1258-7fa0-c82a9ab62646@huawei.com>
[not found] ` <9d07e82a-06fb-a5f8-6f4f-f3c16784b9b7@arm.com>
[not found] ` <3873f3b6-5e0b-360f-2f01-4584e15e960a@arm.com>
[not found] ` <8b9d860f-f235-651e-3e48-34cdc489440d@arm.com>
2023-08-02 12:40 ` Suzuki K Poulose
2023-08-03 2:39 ` Anshuman Khandual
2023-07-11 8:24 ` [PATCH V13 - RESEND 07/10] arm64/perf: Add PERF_ATTACH_TASK_DATA to events with has_branch_stack() Anshuman Khandual
2023-07-11 8:24 ` [PATCH V13 - RESEND 08/10] arm64/perf: Add struct brbe_regset helper functions Anshuman Khandual
2023-07-11 8:24 ` [PATCH V13 - RESEND 09/10] arm64/perf: Implement branch records save on task sched out Anshuman Khandual
2023-08-02 11:59 ` Rajnesh Kanwal
2023-08-02 19:16 ` Marc Zyngier
2023-07-11 8:24 ` [PATCH V13 - RESEND 10/10] arm64/perf: Implement branch records save on PMU IRQ Anshuman Khandual
2023-07-31 13:05 ` Will Deacon [this message]
2023-08-18 3:12 ` [PATCH V13 - RESEND 00/10] arm64/perf: Enable branch stack sampling Anshuman Khandual
2023-08-18 17:56 ` Will Deacon
2023-08-21 8:53 ` Anshuman Khandual
2023-09-27 8:37 ` Anshuman Khandual
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=20230731130538.GA24881@willie-the-truck \
--to=will@kernel.org \
--cc=acme@kernel.org \
--cc=anshuman.khandual@arm.com \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=james.clark@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=robh@kernel.org \
--cc=suzuki.poulose@arm.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