lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1b9afb20-d608-464c-ae6b-c535564b7e5a@ijzerbout.nl>
Date: Tue, 8 Oct 2024 23:10:14 +0200
From: Kees Bakker <kees@...erbout.nl>
To: Antonino Maniscalco <antomani103@...il.com>,
 Rob Clark <robdclark@...il.com>, Sean Paul <sean@...rly.run>,
 Konrad Dybcio <konrad.dybcio@...aro.org>,
 Abhinav Kumar <quic_abhinavk@...cinc.com>,
 Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
 Marijn Suijten <marijn.suijten@...ainline.org>,
 David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
 Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
 Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
 Jonathan Corbet <corbet@....net>
Cc: linux-arm-msm@...r.kernel.org, dri-devel@...ts.freedesktop.org,
 freedreno@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
 linux-doc@...r.kernel.org, Akhil P Oommen <quic_akhilpo@...cinc.com>,
 Neil Armstrong <neil.armstrong@...aro.org>
Subject: Re: [v8,09/12] drm/msm/a6xx: Add traces for preemption

Op 03-10-2024 om 18:12 schreef Antonino Maniscalco:
> Add trace points corresponding to preemption being triggered and being
> completed for latency measurement purposes.
>
> Reviewed-by: Akhil P Oommen <quic_akhilpo@...cinc.com>
> Tested-by: Rob Clark <robdclark@...il.com>
> Tested-by: Neil Armstrong <neil.armstrong@...aro.org> # on SM8650-QRD
> Tested-by: Neil Armstrong <neil.armstrong@...aro.org> # on SM8550-QRD
> Tested-by: Neil Armstrong <neil.armstrong@...aro.org> # on SM8450-HDK
> Signed-off-by: Antonino Maniscalco <antomani103@...il.com>
> ---
>   drivers/gpu/drm/msm/adreno/a6xx_preempt.c |  6 ++++++
>   drivers/gpu/drm/msm/msm_gpu_trace.h       | 28 ++++++++++++++++++++++++++++
>   2 files changed, 34 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_preempt.c b/drivers/gpu/drm/msm/adreno/a6xx_preempt.c
> index 21e333cb6342d33425eb96f97bcc853e9b041b36..6803d5af60cc8fb0f2a52ee160ffdbf0e8ef0209 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_preempt.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_preempt.c
> @@ -7,6 +7,7 @@
>   #include "a6xx_gpu.h"
>   #include "a6xx_gmu.xml.h"
>   #include "msm_mmu.h"
> +#include "msm_gpu_trace.h"
>   
>   /*
>    * Try to transition the preemption state from old to new. Return
> @@ -174,6 +175,8 @@ void a6xx_preempt_irq(struct msm_gpu *gpu)
>   
>   	set_preempt_state(a6xx_gpu, PREEMPT_NONE);
>   
> +	trace_msm_gpu_preemption_irq(a6xx_gpu->cur_ring->id);
> +
>   	/*
>   	 * Retrigger preemption to avoid a deadlock that might occur when preemption
>   	 * is skipped due to it being already in flight when requested.
> @@ -294,6 +297,9 @@ void a6xx_preempt_trigger(struct msm_gpu *gpu)
>   	 */
>   	ring->restore_wptr = false;
>   
> +	trace_msm_gpu_preemption_trigger(a6xx_gpu->cur_ring->id,
> +		ring ? ring->id : -1);
> +
There is no need for the ternary operator. "ring" should be non-NULL, 
otherwise the code would have already crashed.
So the change can just be
     trace_msm_gpu_preemption_trigger(a6xx_gpu->cur_ring->id, ring->id);
-- 
Kees

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ