Re: [Intel-gfx] [RFC 10/11] drm/i915: Export engine stats API to other users

2017-09-29 Thread Joonas Lahtinen
On Mon, 2017-09-11 at 16:25 +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin 
> 
> Other kernel users might want to look at total GPU busyness
> in order to implement things like package power distribution
> algorithms more efficiently.
> 
> Signed-off-by: Tvrtko Ursulin 
> Cc: Ben Widawsky 
> Cc: Ben Widawsky 
> ---
>  drivers/gpu/drm/i915/intel_engine_cs.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c 
> b/drivers/gpu/drm/i915/intel_engine_cs.c
> index f7dba176989c..e2152dd21b4a 100644
> --- a/drivers/gpu/drm/i915/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/intel_engine_cs.c
> @@ -1495,6 +1495,7 @@ int intel_enable_engines_stats(struct drm_i915_private 
> *dev_priv)
>  
>   return ret;
>  }
> +EXPORT_SYMBOL(intel_enable_engines_stats);

EXPORT_SYMBOL_GPL you mean? x3

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [RFC 10/11] drm/i915: Export engine stats API to other users

2017-09-19 Thread Rogozhkin, Dmitry V
On Tue, 2017-09-19 at 12:50 -0700, Ben Widawsky wrote:
> On 17-09-15 10:49:56, Tvrtko Ursulin wrote:
> >
> >On 14/09/2017 21:26, Chris Wilson wrote:
> >>Quoting Tvrtko Ursulin (2017-09-11 16:25:58)
> >>>From: Tvrtko Ursulin 
> >>>
> >>>Other kernel users might want to look at total GPU busyness
> >>>in order to implement things like package power distribution
> >>>algorithms more efficiently.
> >>
> >>Who are we exporting these symbols to? Will you not need all the module
> >>ref handling and load ordering like around ips and audio?
> >
> >Hm yes indeed, I forgot about that.
> >
> >Perhaps Ben could comment on who is the user. If it is purely for 
> >internal explorations, I'll stick the patch at the end of the series 
> >as it is. If it has a more serious user I would need to implement a 
> >proper solution.
> >
> >Regards,
> >
> >Tvrtko
> 
> P-state driver was looking to use this as a way to make determinations about 
> how
> much to limit CPU frequency. Srinivas was privy to the original discussion
> 

I personally was surprised to see private API exposed rather than reuse
of PMU API. Do they really need a private path?

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


Re: [Intel-gfx] [RFC 10/11] drm/i915: Export engine stats API to other users

2017-09-19 Thread Ben Widawsky

On 17-09-15 10:49:56, Tvrtko Ursulin wrote:


On 14/09/2017 21:26, Chris Wilson wrote:

Quoting Tvrtko Ursulin (2017-09-11 16:25:58)

From: Tvrtko Ursulin 

Other kernel users might want to look at total GPU busyness
in order to implement things like package power distribution
algorithms more efficiently.


Who are we exporting these symbols to? Will you not need all the module
ref handling and load ordering like around ips and audio?


Hm yes indeed, I forgot about that.

Perhaps Ben could comment on who is the user. If it is purely for 
internal explorations, I'll stick the patch at the end of the series 
as it is. If it has a more serious user I would need to implement a 
proper solution.


Regards,

Tvrtko


P-state driver was looking to use this as a way to make determinations about how
much to limit CPU frequency. Srinivas was privy to the original discussion

--
Ben Widawsky, Intel Open Source Technology Center
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [RFC 10/11] drm/i915: Export engine stats API to other users

2017-09-15 Thread Tvrtko Ursulin


On 14/09/2017 21:26, Chris Wilson wrote:

Quoting Tvrtko Ursulin (2017-09-11 16:25:58)

From: Tvrtko Ursulin 

Other kernel users might want to look at total GPU busyness
in order to implement things like package power distribution
algorithms more efficiently.


Who are we exporting these symbols to? Will you not need all the module
ref handling and load ordering like around ips and audio?


Hm yes indeed, I forgot about that.

Perhaps Ben could comment on who is the user. If it is purely for 
internal explorations, I'll stick the patch at the end of the series as 
it is. If it has a more serious user I would need to implement a proper 
solution.


Regards,

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


Re: [Intel-gfx] [RFC 10/11] drm/i915: Export engine stats API to other users

2017-09-14 Thread Chris Wilson
Quoting Tvrtko Ursulin (2017-09-11 16:25:58)
> From: Tvrtko Ursulin 
> 
> Other kernel users might want to look at total GPU busyness
> in order to implement things like package power distribution
> algorithms more efficiently.

Who are we exporting these symbols to? Will you not need all the module
ref handling and load ordering like around ips and audio?
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [RFC 10/11] drm/i915: Export engine stats API to other users

2017-09-12 Thread Ben Widawsky

On 17-09-11 16:25:58, Tvrtko Ursulin wrote:

From: Tvrtko Ursulin 

Other kernel users might want to look at total GPU busyness
in order to implement things like package power distribution
algorithms more efficiently.

Signed-off-by: Tvrtko Ursulin 
Cc: Ben Widawsky 
Cc: Ben Widawsky 


Acked-by: Ben Widawsky 
Acked-by: Ben Widawsky 


---
drivers/gpu/drm/i915/intel_engine_cs.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c 
b/drivers/gpu/drm/i915/intel_engine_cs.c
index f7dba176989c..e2152dd21b4a 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -1495,6 +1495,7 @@ int intel_enable_engines_stats(struct drm_i915_private 
*dev_priv)

return ret;
}
+EXPORT_SYMBOL(intel_enable_engines_stats);

/**
 * intel_disable_engines_stats() - Disable engine busy tracking on all engines
@@ -1510,6 +1511,7 @@ void intel_disable_engines_stats(struct drm_i915_private 
*dev_priv)
for_each_engine(engine, dev_priv, id)
intel_disable_engine_stats(engine);
}
+EXPORT_SYMBOL(intel_disable_engines_stats);

/**
 * intel_engine_get_busy_time() - Return current accumulated engine busyness
@@ -1557,6 +1559,7 @@ ktime_t intel_engines_get_busy_time(struct 
drm_i915_private *dev_priv)

return total;
}
+EXPORT_SYMBOL(intel_engines_get_busy_time);

#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
#include "selftests/mock_engine.c"
--
2.9.5



--
Ben Widawsky, Intel Open Source Technology Center
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [RFC 10/11] drm/i915: Export engine stats API to other users

2017-09-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin 

Other kernel users might want to look at total GPU busyness
in order to implement things like package power distribution
algorithms more efficiently.

Signed-off-by: Tvrtko Ursulin 
Cc: Ben Widawsky 
Cc: Ben Widawsky 
---
 drivers/gpu/drm/i915/intel_engine_cs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c 
b/drivers/gpu/drm/i915/intel_engine_cs.c
index f7dba176989c..e2152dd21b4a 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -1495,6 +1495,7 @@ int intel_enable_engines_stats(struct drm_i915_private 
*dev_priv)
 
return ret;
 }
+EXPORT_SYMBOL(intel_enable_engines_stats);
 
 /**
  * intel_disable_engines_stats() - Disable engine busy tracking on all engines
@@ -1510,6 +1511,7 @@ void intel_disable_engines_stats(struct drm_i915_private 
*dev_priv)
for_each_engine(engine, dev_priv, id)
intel_disable_engine_stats(engine);
 }
+EXPORT_SYMBOL(intel_disable_engines_stats);
 
 /**
  * intel_engine_get_busy_time() - Return current accumulated engine busyness
@@ -1557,6 +1559,7 @@ ktime_t intel_engines_get_busy_time(struct 
drm_i915_private *dev_priv)
 
return total;
 }
+EXPORT_SYMBOL(intel_engines_get_busy_time);
 
 #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
 #include "selftests/mock_engine.c"
-- 
2.9.5

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