Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Liang, Kan" <kan.liang@linux.intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-gfx@lists.freedesktop.org,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Subject: Re: [PATCH] drm/i915/pmu: Drop custom hotplug code
Date: Tue, 21 Jan 2025 10:53:31 -0500	[thread overview]
Message-ID: <e15c89bb-88d6-4caf-a199-2febd067634d@linux.intel.com> (raw)
In-Reply-To: <rtmoiu2z4vg42efvz6mwo45eaileyghqowibdzikob7mlnklbm@bz5cc5zkalcd>



On 2025-01-21 9:29 a.m., Lucas De Marchi wrote:
> On Mon, Jan 20, 2025 at 08:42:41PM -0500, Liang, Kan wrote:
>>>>> -static int i915_pmu_cpu_offline(unsigned int cpu, struct hlist_node
>>>>> *node)
>>>>> -{
>>>>> -    struct i915_pmu *pmu = hlist_entry_safe(node, typeof(*pmu),
>>>>> cpuhp.node);
>>>>> -    unsigned int target = i915_pmu_target_cpu;
>>>>> -
>>>>> -    /*
>>>>> -     * Unregistering an instance generates a CPU offline event which
>>>>> we must
>>>>> -     * ignore to avoid incorrectly modifying the shared
>>>>> i915_pmu_cpumask.
>>>>> -     */
>>>>> -    if (!pmu->registered)
>>>>> -        return 0;
>>>>> -
>>>>> -    if (cpumask_test_and_clear_cpu(cpu, &i915_pmu_cpumask)) {
>>>>> -        target = cpumask_any_but(topology_sibling_cpumask(cpu), cpu);
>>>>> -
>>>>
>>>> I'm not familar with the i915 PMU, but it seems suggest a core scope
>>>> PMU, not a system-wide scope.
>>>
>>> counter is in a complete separate device - it doesn't depend on core or
>>> die or pkg - not sure why it cared about topology_sibling_cpumask here.
>>
>> OK. But it's still a behavior change. Please make it clear in the
>> description that the patch also changes/fixes the scope from core scope
>> to system-wide.
> 
> sure... do you have a suggestion how to test the hotplug? For testing
> purposes, can I force the perf cpu assigned to be something other than
> the cpu0?

Yes, it's a bit tricky to verify the hotplug if the assigned CPU is
CPU0. I don't know a way to force another CPU without changing the code.
You may have to instrument the code for the test.

Another test you may want to do is the perf system-wide test, e.g., perf
stat -a -e i915/actual-frequency/ sleep 1.

The existing code assumes the counter is core scope. So the result
should be huge, since perf will read the counter on each core and add
them up.
But this patch claims that the counter is system-wide. With the patch,
the same perf command should only read the counter on the assigned CPU.

Please also post the test results in the changelog. That's the reason
why the scope has to be changed.

Thanks,
Kan



  reply	other threads:[~2025-01-21 15:53 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16 22:24 [PATCH] drm/i915/pmu: Drop custom hotplug code Lucas De Marchi
2025-01-17  3:01 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
2025-01-17  3:15 ` ✗ i915.CI.BAT: failure " Patchwork
2025-01-20 15:08 ` [PATCH] " Liang, Kan
2025-01-20 22:57   ` Lucas De Marchi
2025-01-21  1:42     ` Liang, Kan
2025-01-21 14:29       ` Lucas De Marchi
2025-01-21 15:53         ` Liang, Kan [this message]
2025-01-21 16:59           ` Lucas De Marchi
2025-01-21 17:19             ` Liang, Kan
2025-02-13  4:13               ` Lucas De Marchi
2025-02-13 13:36                 ` Liang, Kan
2025-02-13 14:28                   ` Tvrtko Ursulin
2025-02-13 15:27                     ` Liang, Kan
2025-01-25  0:46             ` Umesh Nerlige Ramappa
2025-01-25 16:32               ` Lucas De Marchi
2025-01-27 23:32                 ` Umesh Nerlige Ramappa
2025-01-23  9:43     ` Tvrtko Ursulin
2025-01-23 16:27       ` Lucas De Marchi
2025-01-23 18:06         ` Tvrtko Ursulin
2025-01-23 19:26           ` Lucas De Marchi
2025-01-23  6:37 ` ✗ Fi.CI.SPARSE: warning for drm/i915/pmu: Drop custom hotplug code (rev2) Patchwork
2025-01-23  6:56 ` ✓ i915.CI.BAT: success " Patchwork
2025-01-24  0:27 ` ✗ i915.CI.Full: failure " Patchwork
2025-01-29  8:37 ` [PATCH] drm/i915/pmu: Drop custom hotplug code Tvrtko Ursulin

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=e15c89bb-88d6-4caf-a199-2febd067634d@linux.intel.com \
    --to=kan.liang@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=peterz@infradead.org \
    --cc=vinay.belgaumkar@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