From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>,
Andi Shyti <andi.shyti@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/3] drm/i915/pmu: add event_to_pmu() helper
Date: Thu, 26 Oct 2023 11:30:07 +0100 [thread overview]
Message-ID: <05993162-ce64-4b34-bfe5-5f33240c519e@linux.intel.com> (raw)
In-Reply-To: <8734xx8yz4.fsf@intel.com>
On 26/10/2023 11:22, Jani Nikula wrote:
> On Wed, 25 Oct 2023, Andi Shyti <andi.shyti@linux.intel.com> wrote:
>> On Wed, Oct 25, 2023 at 11:20:25AM +0100, Tvrtko Ursulin wrote:
>>>
>>> On 24/10/2023 13:42, Jani Nikula wrote:
>>>> On Tue, 24 Oct 2023, Andi Shyti <andi.shyti@linux.intel.com> wrote:
>>>>> Hi Jani,
>>>>>
>>>>> On Mon, Oct 23, 2023 at 06:02:55PM +0300, Jani Nikula wrote:
>>>>>> It's tedious to duplicate the container_of() everywhere. Add a helper.
>>>>>>
>>>>>> Also do the logical steps of first getting from struct perf_event to
>>>>>> struct i915_pmu, and then from struct i915_pmu to struct
>>>>>> drm_i915_private if needed, instead of perf_event->i915->pmu. Not all
>>>>>> places even need the i915 pointer.
>>>>>>
>>>>>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>>>>>> ---
>>>>>> drivers/gpu/drm/i915/i915_pmu.c | 45 +++++++++++++++------------------
>>>>>> 1 file changed, 20 insertions(+), 25 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
>>>>>> index dcae2fcd8d36..d45b40ec6d47 100644
>>>>>> --- a/drivers/gpu/drm/i915/i915_pmu.c
>>>>>> +++ b/drivers/gpu/drm/i915/i915_pmu.c
>>>>>> @@ -31,6 +31,11 @@
>>>>>> static cpumask_t i915_pmu_cpumask;
>>>>>> static unsigned int i915_pmu_target_cpu = -1;
>>>>>> +static struct i915_pmu *event_to_pmu(struct perf_event *event)
>>>>>
>>>>> I would call it perfevent (or perf_event), event is too generic.
>>>>> We have other kind of events, too.
>>>>
>>>> Fair enough.
>>>
>>> Counter argument is that i915_pmu.c consistently names this event (which is
>>> likely lifted from other PMU drivers) so is the proposal to churn it all, or
>>> create an inconsistency?
>>
>> The first that comes to my mind is that the debugger is also
>> using the term "event"... on the other hand there is no debugger
>> in i915.
>
> Have you settled on this? I don't care either way, could apply either
> patch.
To me it is clear that preference should be to remain consistent within
the file, that is, leave it as you originally had.
Regards,
Tvrtko
next prev parent reply other threads:[~2023-10-26 10:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-23 15:02 [Intel-gfx] [PATCH 1/3] drm/i915/pmu: add pmu_to_i915() helper Jani Nikula
2023-10-23 15:02 ` [Intel-gfx] [PATCH 2/3] drm/i915/pmu: add event_to_pmu() helper Jani Nikula
2023-10-24 12:29 ` Andi Shyti
2023-10-24 12:42 ` Jani Nikula
2023-10-25 10:20 ` Tvrtko Ursulin
2023-10-25 10:29 ` Andi Shyti
2023-10-26 10:22 ` Jani Nikula
2023-10-26 10:30 ` Tvrtko Ursulin [this message]
2023-10-26 10:36 ` Andi Shyti
2023-10-26 10:51 ` Tvrtko Ursulin
2023-10-26 10:58 ` Andi Shyti
2023-10-31 9:13 ` Jani Nikula
2023-10-24 12:43 ` [Intel-gfx] [PATCH v2] drm/i915/pmu: add perf_event_to_pmu() helper Jani Nikula
2023-10-23 15:02 ` [Intel-gfx] [PATCH 3/3] drm/i915/pmu: rearrange hrtimer pointer chasing Jani Nikula
2023-10-24 12:30 ` Andi Shyti
2023-10-24 12:25 ` [Intel-gfx] [PATCH 1/3] drm/i915/pmu: add pmu_to_i915() helper Andi Shyti
2023-10-25 0:09 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/3] drm/i915/pmu: add pmu_to_i915() helper (rev2) Patchwork
2023-10-27 0:16 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/3] drm/i915/pmu: add pmu_to_i915() helper (rev3) Patchwork
2023-10-27 19:35 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915/pmu: add pmu_to_i915() helper (rev4) Patchwork
2023-10-30 4:48 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
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=05993162-ce64-4b34-bfe5-5f33240c519e@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=andi.shyti@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.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