* [PATCH v3] drm/i915: Run relevant bits of debugfs drop_caches per GT
@ 2023-09-07 12:58 Andi Shyti
2023-09-07 13:47 ` Rodrigo Vivi
2023-09-07 13:49 ` Nirmoy Das
0 siblings, 2 replies; 4+ messages in thread
From: Andi Shyti @ 2023-09-07 12:58 UTC (permalink / raw)
To: Tvrtko Ursulin, Nirmoy Das; +Cc: intel-gfx, Andi Shyti, dri-devel
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Walk all GTs when doing the respective bits of drop_caches work.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
---
Hi,
I'm proposing this new version of the series I sent here[*].
Patch 1 from that series is not necessary so taht I'm going to
propose the original version proposed by Tvrtko when we were
young.
Andi
Changelog
=========
v2 -> v3:
- fix the "for_each_gt()" parameter order.
v1 -> v2:
- drop the gt idling and the cache flushing decoupling and stick
to the original version.
[*] https://patchwork.freedesktop.org/series/123301/
drivers/gpu/drm/i915/i915_debugfs.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 7a90a2e32c9f1..e9b79c2c37d84 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -740,15 +740,19 @@ static int
i915_drop_caches_set(void *data, u64 val)
{
struct drm_i915_private *i915 = data;
+ struct intel_gt *gt;
unsigned int flags;
+ unsigned int i;
int ret;
drm_dbg(&i915->drm, "Dropping caches: 0x%08llx [0x%08llx]\n",
val, val & DROP_ALL);
- ret = gt_drop_caches(to_gt(i915), val);
- if (ret)
- return ret;
+ for_each_gt(gt, i915, i) {
+ ret = gt_drop_caches(gt, val);
+ if (ret)
+ return ret;
+ }
fs_reclaim_acquire(GFP_KERNEL);
flags = memalloc_noreclaim_save();
--
2.40.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3] drm/i915: Run relevant bits of debugfs drop_caches per GT
2023-09-07 12:58 [PATCH v3] drm/i915: Run relevant bits of debugfs drop_caches per GT Andi Shyti
@ 2023-09-07 13:47 ` Rodrigo Vivi
2023-09-08 22:23 ` Andi Shyti
2023-09-07 13:49 ` Nirmoy Das
1 sibling, 1 reply; 4+ messages in thread
From: Rodrigo Vivi @ 2023-09-07 13:47 UTC (permalink / raw)
To: Andi Shyti; +Cc: Tvrtko Ursulin, intel-gfx, dri-devel, Nirmoy Das
On Thu, Sep 07, 2023 at 02:58:08PM +0200, Andi Shyti wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> Walk all GTs when doing the respective bits of drop_caches work.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> Hi,
>
> I'm proposing this new version of the series I sent here[*].
> Patch 1 from that series is not necessary so taht I'm going to
> propose the original version proposed by Tvrtko when we were
> young.
>
> Andi
>
> Changelog
> =========
> v2 -> v3:
> - fix the "for_each_gt()" parameter order.
> v1 -> v2:
> - drop the gt idling and the cache flushing decoupling and stick
> to the original version.
>
> [*] https://patchwork.freedesktop.org/series/123301/
>
> drivers/gpu/drm/i915/i915_debugfs.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 7a90a2e32c9f1..e9b79c2c37d84 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -740,15 +740,19 @@ static int
> i915_drop_caches_set(void *data, u64 val)
> {
> struct drm_i915_private *i915 = data;
> + struct intel_gt *gt;
> unsigned int flags;
> + unsigned int i;
> int ret;
>
> drm_dbg(&i915->drm, "Dropping caches: 0x%08llx [0x%08llx]\n",
> val, val & DROP_ALL);
>
> - ret = gt_drop_caches(to_gt(i915), val);
> - if (ret)
> - return ret;
> + for_each_gt(gt, i915, i) {
> + ret = gt_drop_caches(gt, val);
> + if (ret)
> + return ret;
> + }
>
> fs_reclaim_acquire(GFP_KERNEL);
> flags = memalloc_noreclaim_save();
> --
> 2.40.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] drm/i915: Run relevant bits of debugfs drop_caches per GT
2023-09-07 12:58 [PATCH v3] drm/i915: Run relevant bits of debugfs drop_caches per GT Andi Shyti
2023-09-07 13:47 ` Rodrigo Vivi
@ 2023-09-07 13:49 ` Nirmoy Das
1 sibling, 0 replies; 4+ messages in thread
From: Nirmoy Das @ 2023-09-07 13:49 UTC (permalink / raw)
To: Andi Shyti, Tvrtko Ursulin; +Cc: intel-gfx, dri-devel
On 9/7/2023 2:58 PM, Andi Shyti wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> Walk all GTs when doing the respective bits of drop_caches work.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
> Hi,
>
> I'm proposing this new version of the series I sent here[*].
> Patch 1 from that series is not necessary so taht I'm going to
> propose the original version proposed by Tvrtko when we were
> young.
>
> Andi
>
> Changelog
> =========
> v2 -> v3:
> - fix the "for_each_gt()" parameter order.
> v1 -> v2:
> - drop the gt idling and the cache flushing decoupling and stick
> to the original version.
>
> [*] https://patchwork.freedesktop.org/series/123301/
>
> drivers/gpu/drm/i915/i915_debugfs.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 7a90a2e32c9f1..e9b79c2c37d84 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -740,15 +740,19 @@ static int
> i915_drop_caches_set(void *data, u64 val)
> {
> struct drm_i915_private *i915 = data;
> + struct intel_gt *gt;
> unsigned int flags;
> + unsigned int i;
> int ret;
>
> drm_dbg(&i915->drm, "Dropping caches: 0x%08llx [0x%08llx]\n",
> val, val & DROP_ALL);
>
> - ret = gt_drop_caches(to_gt(i915), val);
> - if (ret)
> - return ret;
> + for_each_gt(gt, i915, i) {
> + ret = gt_drop_caches(gt, val);
> + if (ret)
> + return ret;
> + }
>
> fs_reclaim_acquire(GFP_KERNEL);
> flags = memalloc_noreclaim_save();
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] drm/i915: Run relevant bits of debugfs drop_caches per GT
2023-09-07 13:47 ` Rodrigo Vivi
@ 2023-09-08 22:23 ` Andi Shyti
0 siblings, 0 replies; 4+ messages in thread
From: Andi Shyti @ 2023-09-08 22:23 UTC (permalink / raw)
To: Rodrigo Vivi; +Cc: Tvrtko Ursulin, intel-gfx, dri-devel, Andi Shyti, Nirmoy Das
Hi Rodrigo and Nirmoy,
On Thu, Sep 07, 2023 at 09:47:19AM -0400, Rodrigo Vivi wrote:
> On Thu, Sep 07, 2023 at 02:58:08PM +0200, Andi Shyti wrote:
> > From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> >
> > Walk all GTs when doing the respective bits of drop_caches work.
> >
> > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
thanks for your review, pushed to drm-intel-gt-next.
Andi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-08 22:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-07 12:58 [PATCH v3] drm/i915: Run relevant bits of debugfs drop_caches per GT Andi Shyti
2023-09-07 13:47 ` Rodrigo Vivi
2023-09-08 22:23 ` Andi Shyti
2023-09-07 13:49 ` Nirmoy Das
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox