Lucas De Marchi 514447a121 drm/xe: Stop accumulating LRC timestamp on job_free
The exec queue timestamp is only really useful when it's being queried
through the fdinfo. There's no need to update it so often, on every
job_free. Tracing a simple app like vkcube running shows an update
rate of ~ 120Hz. In case of discrete, the BO is on vram, creating a lot
of pcie transactions.

The update on job_free() is used to cover a gap: if exec
queue is created and destroyed rapidly, before a new query, the
timestamp still needs to be accumulated and accounted for in the xef.

Initial implementation in commit 6109f24f87d7 ("drm/xe: Add helper to
accumulate exec queue runtime") couldn't do it on the exec_queue_fini
since the xef could be gone at that point. However since commit
ce8c161cbad4 ("drm/xe: Add ref counting for xe_file") the xef is
refcounted and the exec queue always holds a reference, making this safe
now.

Improve the fix in commit 2149ded63079 ("drm/xe: Fix use after free when
client stats are captured") by reducing the frequency in which the
update is needed.

Fixes: 2149ded63079 ("drm/xe: Fix use after free when client stats are captured")
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241104143815.2112272-3-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
(cherry picked from commit 83db047d9425d9a649f01573797558eff0f632e1)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-11-05 15:40:13 -08:00
..
2024-06-18 12:40:38 -07:00
2024-06-12 11:31:42 -04:00
2024-05-09 21:28:25 +02:00
2024-08-01 11:00:14 -07:00
2024-04-02 10:33:57 -07:00
2024-08-27 14:09:45 +02:00
2023-12-21 11:37:31 -05:00
2024-05-31 00:02:04 +02:00
2024-08-30 10:51:09 +02:00
2024-09-01 20:43:33 -07:00
2024-05-13 21:36:50 +02:00
2024-04-02 10:33:57 -07:00
2024-10-11 09:03:30 +10:00
2024-05-22 12:03:55 +02:00
2024-07-17 09:47:15 -07:00
2024-06-26 18:25:22 -04:00
2024-07-22 12:53:04 +02:00
2024-06-18 12:40:38 -07:00
2024-04-02 10:33:57 -07:00
2024-08-27 14:09:45 +02:00
2024-05-07 12:03:49 +02:00
2024-10-03 01:13:54 -05:00
2024-08-27 14:09:45 +02:00
2024-05-13 21:36:52 +02:00
2024-06-18 12:03:29 -07:00
2024-07-04 11:54:35 +02:00
2023-12-21 11:45:24 -05:00
2024-07-03 22:28:06 -07:00
2024-08-27 14:09:45 +02:00
2023-12-21 11:45:06 -05:00
2023-12-21 11:45:06 -05:00
2024-07-18 10:25:33 -04:00
2024-07-18 10:25:33 -04:00
2024-05-07 12:45:39 -04:00
2024-07-24 09:05:37 -07:00
2023-12-21 11:44:39 -05:00