All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915/pmu: Limit the selection of the dedicated reader cpu to an online sibling
@ 2017-11-22 18:26 Chris Wilson
  2017-11-22 18:26 ` [PATCH 2/2] drm/i915/pmu: Remove conditional HOTPLUG_CPU registration Chris Wilson
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Chris Wilson @ 2017-11-22 18:26 UTC (permalink / raw)
  To: intel-gfx

When bringing a cpu online, we want to see if it or a sibling is already
in the online mask before adding to the designated reader.

Fixes: b46a33e271ed ("drm/i915/pmu: Expose a PMU interface for perf queries")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
---
 drivers/gpu/drm/i915/i915_pmu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index 1071935bfa67..64e36d72e76a 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -750,7 +750,8 @@ static int i915_pmu_cpu_online(unsigned int cpu, struct hlist_node *node)
 
 	GEM_BUG_ON(!pmu->base.event_init);
 
-	target = cpumask_any_and(&i915_pmu_cpumask, &i915_pmu_cpumask);
+	target = cpumask_any_and(&i915_pmu_cpumask,
+				 topology_sibling_cpumask(cpu));
 	/* Select the first online CPU as a designated reader. */
 	if (target >= nr_cpu_ids)
 		cpumask_set_cpu(cpu, &i915_pmu_cpumask);
-- 
2.15.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] drm/i915/pmu: Remove conditional HOTPLUG_CPU registration
  2017-11-22 18:26 [PATCH 1/2] drm/i915/pmu: Limit the selection of the dedicated reader cpu to an online sibling Chris Wilson
@ 2017-11-22 18:26 ` Chris Wilson
  2017-11-23  7:36   ` Tvrtko Ursulin
  2017-11-22 18:47 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/pmu: Limit the selection of the dedicated reader cpu to an online sibling Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Chris Wilson @ 2017-11-22 18:26 UTC (permalink / raw)
  To: intel-gfx

Even for static CPU configurations, the hotplug CPU framework is still
used to determine the CPU topology, and is still being used by the perf
event register to check for valid CPUs.

Fixes: b46a33e271ed ("drm/i915/pmu: Expose a PMU interface for perf queries")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
---
 drivers/gpu/drm/i915/i915_pmu.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index 64e36d72e76a..f1e932a3fb85 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -40,7 +40,7 @@
 
 #define ENGINE_SAMPLE_BITS (1 << I915_PMU_SAMPLE_BITS)
 
-static cpumask_t i915_pmu_cpumask = CPU_MASK_NONE;
+static cpumask_t i915_pmu_cpumask;
 
 static u8 engine_config_sample(u64 config)
 {
@@ -742,7 +742,6 @@ static const struct attribute_group *i915_pmu_attr_groups[] = {
 	NULL
 };
 
-#ifdef CONFIG_HOTPLUG_CPU
 static int i915_pmu_cpu_online(unsigned int cpu, struct hlist_node *node)
 {
 	struct i915_pmu *pmu = hlist_entry_safe(node, typeof(*pmu), node);
@@ -779,11 +778,9 @@ static int i915_pmu_cpu_offline(unsigned int cpu, struct hlist_node *node)
 }
 
 static enum cpuhp_state cpuhp_slot = CPUHP_INVALID;
-#endif
 
 static int i915_pmu_register_cpuhp_state(struct drm_i915_private *i915)
 {
-#ifdef CONFIG_HOTPLUG_CPU
 	enum cpuhp_state slot;
 	int ret;
 
@@ -802,17 +799,14 @@ static int i915_pmu_register_cpuhp_state(struct drm_i915_private *i915)
 	}
 
 	cpuhp_slot = slot;
-#endif
 	return 0;
 }
 
 static void i915_pmu_unregister_cpuhp_state(struct drm_i915_private *i915)
 {
-#ifdef CONFIG_HOTPLUG_CPU
 	WARN_ON(cpuhp_slot == CPUHP_INVALID);
 	WARN_ON(cpuhp_state_remove_instance(cpuhp_slot, &i915->pmu.node));
 	cpuhp_remove_multi_state(cpuhp_slot);
-#endif
 }
 
 void i915_pmu_register(struct drm_i915_private *i915)
-- 
2.15.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/pmu: Limit the selection of the dedicated reader cpu to an online sibling
  2017-11-22 18:26 [PATCH 1/2] drm/i915/pmu: Limit the selection of the dedicated reader cpu to an online sibling Chris Wilson
  2017-11-22 18:26 ` [PATCH 2/2] drm/i915/pmu: Remove conditional HOTPLUG_CPU registration Chris Wilson
@ 2017-11-22 18:47 ` Patchwork
  2017-11-22 20:12 ` ✗ Fi.CI.IGT: warning " Patchwork
  2017-11-23  7:33 ` [PATCH 1/2] " Tvrtko Ursulin
  3 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2017-11-22 18:47 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915/pmu: Limit the selection of the dedicated reader cpu to an online sibling
URL   : https://patchwork.freedesktop.org/series/34247/
State : success

== Summary ==

Series 34247v1 series starting with [1/2] drm/i915/pmu: Limit the selection of the dedicated reader cpu to an online sibling
https://patchwork.freedesktop.org/api/1.0/series/34247/revisions/1/mbox/

Test gem_ringfill:
        Subgroup basic-default-hang:
                dmesg-warn -> PASS       (fi-blb-e6850) fdo#101600

fdo#101600 https://bugs.freedesktop.org/show_bug.cgi?id=101600

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:443s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:454s
fi-blb-e6850     total:289  pass:224  dwarn:0   dfail:0   fail:0   skip:65  time:382s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:545s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:278s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:507s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:519s
fi-byt-j1900     total:289  pass:254  dwarn:0   dfail:0   fail:0   skip:35  time:510s
fi-byt-n2820     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:497s
fi-cfl-s2        total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:607s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:428s
fi-gdg-551       total:289  pass:178  dwarn:1   dfail:0   fail:1   skip:109 time:263s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:549s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:437s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:440s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:430s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:473s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:475s
fi-kbl-7500u     total:289  pass:264  dwarn:1   dfail:0   fail:0   skip:24  time:481s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:527s
fi-kbl-7567u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:483s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:535s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:586s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:456s
fi-skl-6600u     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:546s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:567s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:523s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:503s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:455s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:563s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:429s
Blacklisted hosts:
fi-cnl-y         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:554s
fi-glk-dsi       total:132  pass:119  dwarn:0   dfail:0   fail:0   skip:12 

368de251cb3d8b5a69ea4e2731a2b53d329c8485 drm-tip: 2017y-11m-22d-11h-27m-26s UTC integration manifest
c2d5663d519b drm/i915/pmu: Remove conditional HOTPLUG_CPU registration
64cc77679211 drm/i915/pmu: Limit the selection of the dedicated reader cpu to an online sibling

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7238/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* ✗ Fi.CI.IGT: warning for series starting with [1/2] drm/i915/pmu: Limit the selection of the dedicated reader cpu to an online sibling
  2017-11-22 18:26 [PATCH 1/2] drm/i915/pmu: Limit the selection of the dedicated reader cpu to an online sibling Chris Wilson
  2017-11-22 18:26 ` [PATCH 2/2] drm/i915/pmu: Remove conditional HOTPLUG_CPU registration Chris Wilson
  2017-11-22 18:47 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/pmu: Limit the selection of the dedicated reader cpu to an online sibling Patchwork
@ 2017-11-22 20:12 ` Patchwork
  2017-11-23  7:33 ` [PATCH 1/2] " Tvrtko Ursulin
  3 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2017-11-22 20:12 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915/pmu: Limit the selection of the dedicated reader cpu to an online sibling
URL   : https://patchwork.freedesktop.org/series/34247/
State : warning

== Summary ==

Test kms_setmode:
        Subgroup basic:
                pass       -> FAIL       (shard-hsw) fdo#99912
Test kms_flip:
        Subgroup plain-flip-ts-check-interruptible:
                fail       -> PASS       (shard-hsw) fdo#100368
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
                pass       -> FAIL       (shard-snb) fdo#101623
Test kms_plane:
        Subgroup plane-panning-bottom-right-suspend-pipe-a-planes:
                pass       -> SKIP       (shard-hsw) fdo#103667
Test kms_cursor_legacy:
        Subgroup basic-busy-flip-before-cursor-atomic:
                pass       -> SKIP       (shard-hsw)

fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103667 https://bugs.freedesktop.org/show_bug.cgi?id=103667

shard-hsw        total:2667 pass:1519 dwarn:8   dfail:1   fail:15  skip:1124 time:9198s
shard-snb        total:2667 pass:1299 dwarn:8   dfail:0   fail:19  skip:1341 time:7798s
Blacklisted hosts:
shard-apl        total:2667 pass:1679 dwarn:9   dfail:0   fail:24  skip:954 time:12453s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7238/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] drm/i915/pmu: Limit the selection of the dedicated reader cpu to an online sibling
  2017-11-22 18:26 [PATCH 1/2] drm/i915/pmu: Limit the selection of the dedicated reader cpu to an online sibling Chris Wilson
                   ` (2 preceding siblings ...)
  2017-11-22 20:12 ` ✗ Fi.CI.IGT: warning " Patchwork
@ 2017-11-23  7:33 ` Tvrtko Ursulin
  3 siblings, 0 replies; 8+ messages in thread
From: Tvrtko Ursulin @ 2017-11-23  7:33 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx


On 22/11/2017 18:26, Chris Wilson wrote:
> When bringing a cpu online, we want to see if it or a sibling is already
> in the online mask before adding to the designated reader.
> 
> Fixes: b46a33e271ed ("drm/i915/pmu: Expose a PMU interface for perf queries")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
> ---
>   drivers/gpu/drm/i915/i915_pmu.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
> index 1071935bfa67..64e36d72e76a 100644
> --- a/drivers/gpu/drm/i915/i915_pmu.c
> +++ b/drivers/gpu/drm/i915/i915_pmu.c
> @@ -750,7 +750,8 @@ static int i915_pmu_cpu_online(unsigned int cpu, struct hlist_node *node)
>   
>   	GEM_BUG_ON(!pmu->base.event_init);
>   
> -	target = cpumask_any_and(&i915_pmu_cpumask, &i915_pmu_cpumask);
> +	target = cpumask_any_and(&i915_pmu_cpumask,
> +				 topology_sibling_cpumask(cpu));
>   	/* Select the first online CPU as a designated reader. */
>   	if (target >= nr_cpu_ids)
>   		cpumask_set_cpu(cpu, &i915_pmu_cpumask);
>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] drm/i915/pmu: Remove conditional HOTPLUG_CPU registration
  2017-11-22 18:26 ` [PATCH 2/2] drm/i915/pmu: Remove conditional HOTPLUG_CPU registration Chris Wilson
@ 2017-11-23  7:36   ` Tvrtko Ursulin
  2017-11-23  7:40     ` Chris Wilson
  0 siblings, 1 reply; 8+ messages in thread
From: Tvrtko Ursulin @ 2017-11-23  7:36 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx


On 22/11/2017 18:26, Chris Wilson wrote:
> Even for static CPU configurations, the hotplug CPU framework is still
> used to determine the CPU topology, and is still being used by the perf
> event register to check for valid CPUs.
> 
> Fixes: b46a33e271ed ("drm/i915/pmu: Expose a PMU interface for perf queries")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
> ---
>   drivers/gpu/drm/i915/i915_pmu.c | 8 +-------
>   1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
> index 64e36d72e76a..f1e932a3fb85 100644
> --- a/drivers/gpu/drm/i915/i915_pmu.c
> +++ b/drivers/gpu/drm/i915/i915_pmu.c
> @@ -40,7 +40,7 @@
>   
>   #define ENGINE_SAMPLE_BITS (1 << I915_PMU_SAMPLE_BITS)
>   
> -static cpumask_t i915_pmu_cpumask = CPU_MASK_NONE;
> +static cpumask_t i915_pmu_cpumask;
>   
>   static u8 engine_config_sample(u64 config)
>   {
> @@ -742,7 +742,6 @@ static const struct attribute_group *i915_pmu_attr_groups[] = {
>   	NULL
>   };
>   
> -#ifdef CONFIG_HOTPLUG_CPU
>   static int i915_pmu_cpu_online(unsigned int cpu, struct hlist_node *node)
>   {
>   	struct i915_pmu *pmu = hlist_entry_safe(node, typeof(*pmu), node);
> @@ -779,11 +778,9 @@ static int i915_pmu_cpu_offline(unsigned int cpu, struct hlist_node *node)
>   }
>   
>   static enum cpuhp_state cpuhp_slot = CPUHP_INVALID;
> -#endif
>   
>   static int i915_pmu_register_cpuhp_state(struct drm_i915_private *i915)
>   {
> -#ifdef CONFIG_HOTPLUG_CPU
>   	enum cpuhp_state slot;
>   	int ret;
>   
> @@ -802,17 +799,14 @@ static int i915_pmu_register_cpuhp_state(struct drm_i915_private *i915)
>   	}
>   
>   	cpuhp_slot = slot;
> -#endif
>   	return 0;
>   }
>   
>   static void i915_pmu_unregister_cpuhp_state(struct drm_i915_private *i915)
>   {
> -#ifdef CONFIG_HOTPLUG_CPU
>   	WARN_ON(cpuhp_slot == CPUHP_INVALID);
>   	WARN_ON(cpuhp_state_remove_instance(cpuhp_slot, &i915->pmu.node));
>   	cpuhp_remove_multi_state(cpuhp_slot);
> -#endif
>   }
>   
>   void i915_pmu_register(struct drm_i915_private *i915)
> 

You are saying CPU hotplug events are firing with CONFIG_HOTPLUG_CPU=n?

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] drm/i915/pmu: Remove conditional HOTPLUG_CPU registration
  2017-11-23  7:36   ` Tvrtko Ursulin
@ 2017-11-23  7:40     ` Chris Wilson
  2017-11-23  8:41       ` Tvrtko Ursulin
  0 siblings, 1 reply; 8+ messages in thread
From: Chris Wilson @ 2017-11-23  7:40 UTC (permalink / raw)
  To: Tvrtko Ursulin, intel-gfx

Quoting Tvrtko Ursulin (2017-11-23 07:36:35)
> 
> On 22/11/2017 18:26, Chris Wilson wrote:
> > Even for static CPU configurations, the hotplug CPU framework is still
> > used to determine the CPU topology, and is still being used by the perf
> > event register to check for valid CPUs.
> > 
> > Fixes: b46a33e271ed ("drm/i915/pmu: Expose a PMU interface for perf queries")
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
> > ---
> >   drivers/gpu/drm/i915/i915_pmu.c | 8 +-------
> >   1 file changed, 1 insertion(+), 7 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
> > index 64e36d72e76a..f1e932a3fb85 100644
> > --- a/drivers/gpu/drm/i915/i915_pmu.c
> > +++ b/drivers/gpu/drm/i915/i915_pmu.c
> > @@ -40,7 +40,7 @@
> >   
> >   #define ENGINE_SAMPLE_BITS (1 << I915_PMU_SAMPLE_BITS)
> >   
> > -static cpumask_t i915_pmu_cpumask = CPU_MASK_NONE;
> > +static cpumask_t i915_pmu_cpumask;
> >   
> >   static u8 engine_config_sample(u64 config)
> >   {
> > @@ -742,7 +742,6 @@ static const struct attribute_group *i915_pmu_attr_groups[] = {
> >       NULL
> >   };
> >   
> > -#ifdef CONFIG_HOTPLUG_CPU
> >   static int i915_pmu_cpu_online(unsigned int cpu, struct hlist_node *node)
> >   {
> >       struct i915_pmu *pmu = hlist_entry_safe(node, typeof(*pmu), node);
> > @@ -779,11 +778,9 @@ static int i915_pmu_cpu_offline(unsigned int cpu, struct hlist_node *node)
> >   }
> >   
> >   static enum cpuhp_state cpuhp_slot = CPUHP_INVALID;
> > -#endif
> >   
> >   static int i915_pmu_register_cpuhp_state(struct drm_i915_private *i915)
> >   {
> > -#ifdef CONFIG_HOTPLUG_CPU
> >       enum cpuhp_state slot;
> >       int ret;
> >   
> > @@ -802,17 +799,14 @@ static int i915_pmu_register_cpuhp_state(struct drm_i915_private *i915)
> >       }
> >   
> >       cpuhp_slot = slot;
> > -#endif
> >       return 0;
> >   }
> >   
> >   static void i915_pmu_unregister_cpuhp_state(struct drm_i915_private *i915)
> >   {
> > -#ifdef CONFIG_HOTPLUG_CPU
> >       WARN_ON(cpuhp_slot == CPUHP_INVALID);
> >       WARN_ON(cpuhp_state_remove_instance(cpuhp_slot, &i915->pmu.node));
> >       cpuhp_remove_multi_state(cpuhp_slot);
> > -#endif
> >   }
> >   
> >   void i915_pmu_register(struct drm_i915_private *i915)
> > 
> 
> You are saying CPU hotplug events are firing with CONFIG_HOTPLUG_CPU=n?

Yes. Both in practice and copying from other perf pmus.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] drm/i915/pmu: Remove conditional HOTPLUG_CPU registration
  2017-11-23  7:40     ` Chris Wilson
@ 2017-11-23  8:41       ` Tvrtko Ursulin
  0 siblings, 0 replies; 8+ messages in thread
From: Tvrtko Ursulin @ 2017-11-23  8:41 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx


On 23/11/2017 07:40, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2017-11-23 07:36:35)
>>
>> On 22/11/2017 18:26, Chris Wilson wrote:
>>> Even for static CPU configurations, the hotplug CPU framework is still
>>> used to determine the CPU topology, and is still being used by the perf
>>> event register to check for valid CPUs.
>>>
>>> Fixes: b46a33e271ed ("drm/i915/pmu: Expose a PMU interface for perf queries")
>>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>>> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>> Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
>>> ---
>>>    drivers/gpu/drm/i915/i915_pmu.c | 8 +-------
>>>    1 file changed, 1 insertion(+), 7 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
>>> index 64e36d72e76a..f1e932a3fb85 100644
>>> --- a/drivers/gpu/drm/i915/i915_pmu.c
>>> +++ b/drivers/gpu/drm/i915/i915_pmu.c
>>> @@ -40,7 +40,7 @@
>>>    
>>>    #define ENGINE_SAMPLE_BITS (1 << I915_PMU_SAMPLE_BITS)
>>>    
>>> -static cpumask_t i915_pmu_cpumask = CPU_MASK_NONE;
>>> +static cpumask_t i915_pmu_cpumask;
>>>    
>>>    static u8 engine_config_sample(u64 config)
>>>    {
>>> @@ -742,7 +742,6 @@ static const struct attribute_group *i915_pmu_attr_groups[] = {
>>>        NULL
>>>    };
>>>    
>>> -#ifdef CONFIG_HOTPLUG_CPU
>>>    static int i915_pmu_cpu_online(unsigned int cpu, struct hlist_node *node)
>>>    {
>>>        struct i915_pmu *pmu = hlist_entry_safe(node, typeof(*pmu), node);
>>> @@ -779,11 +778,9 @@ static int i915_pmu_cpu_offline(unsigned int cpu, struct hlist_node *node)
>>>    }
>>>    
>>>    static enum cpuhp_state cpuhp_slot = CPUHP_INVALID;
>>> -#endif
>>>    
>>>    static int i915_pmu_register_cpuhp_state(struct drm_i915_private *i915)
>>>    {
>>> -#ifdef CONFIG_HOTPLUG_CPU
>>>        enum cpuhp_state slot;
>>>        int ret;
>>>    
>>> @@ -802,17 +799,14 @@ static int i915_pmu_register_cpuhp_state(struct drm_i915_private *i915)
>>>        }
>>>    
>>>        cpuhp_slot = slot;
>>> -#endif
>>>        return 0;
>>>    }
>>>    
>>>    static void i915_pmu_unregister_cpuhp_state(struct drm_i915_private *i915)
>>>    {
>>> -#ifdef CONFIG_HOTPLUG_CPU
>>>        WARN_ON(cpuhp_slot == CPUHP_INVALID);
>>>        WARN_ON(cpuhp_state_remove_instance(cpuhp_slot, &i915->pmu.node));
>>>        cpuhp_remove_multi_state(cpuhp_slot);
>>> -#endif
>>>    }
>>>    
>>>    void i915_pmu_register(struct drm_i915_private *i915)
>>>
>>
>> You are saying CPU hotplug events are firing with CONFIG_HOTPLUG_CPU=n?
> 
> Yes. Both in practice and copying from other perf pmus.

I can see that myself when looking around more carefully.

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko



_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-11-23  8:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-22 18:26 [PATCH 1/2] drm/i915/pmu: Limit the selection of the dedicated reader cpu to an online sibling Chris Wilson
2017-11-22 18:26 ` [PATCH 2/2] drm/i915/pmu: Remove conditional HOTPLUG_CPU registration Chris Wilson
2017-11-23  7:36   ` Tvrtko Ursulin
2017-11-23  7:40     ` Chris Wilson
2017-11-23  8:41       ` Tvrtko Ursulin
2017-11-22 18:47 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/pmu: Limit the selection of the dedicated reader cpu to an online sibling Patchwork
2017-11-22 20:12 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-11-23  7:33 ` [PATCH 1/2] " Tvrtko Ursulin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.