mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Price <steven.price@arm.com>
To: Chia-I Wu <olvaffe@gmail.com>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	Liviu Dudau <liviu.dudau@arm.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] panthor: save task pid and comm in panthor_group
Date: Thu, 17 Jul 2025 16:24:12 +0100	[thread overview]
Message-ID: <2aee25e2-b9cd-4f86-80dd-9d9881c036c8@arm.com> (raw)
In-Reply-To: <20250713030831.3227607-3-olvaffe@gmail.com>

On 13/07/2025 04:08, Chia-I Wu wrote:
> We would like to report them on gpu errors.
> 
> We choose to save the info on panthor_group_create rather than on
> panthor_open because, when the two differ, we are more interested in the
> task that created the group.
> 
> Signed-off-by: Chia-I Wu <olvaffe@gmail.com>

One nit below, but with that fixed:

Reviewed-by: Steven Price <steven.price@arm.com>

> 
> ---
> v2: save to panthor_group on panthor_group_create rather than to
>     panthor_file on panthor_open
> ---
>  drivers/gpu/drm/panthor/panthor_sched.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
> index a2248f692a030..823b0fe678ba6 100644
> --- a/drivers/gpu/drm/panthor/panthor_sched.c
> +++ b/drivers/gpu/drm/panthor/panthor_sched.c
> @@ -641,6 +641,15 @@ struct panthor_group {
>  		size_t kbo_sizes;
>  	} fdinfo;
>  
> +	/** @task_info: Info of current->group_leader that created the group. */
> +	struct {
> +		/** @pid: pid of current->group_leader */
> +		pid_t pid;
> +
> +		/** @comm: comm of current->group_leader */
> +		char comm[TASK_COMM_LEN];

As the kernel test robot reports, this kerneldoc isn't quite right.
We've got other issues in this file but you need to specify the struct
name as well, i.e.:

		/** @task_info.pid: pid of current->group_leader */
		pid_t pid;

		/** @task_info.comm: comm of current->group_leader */
		char comm[TASK_COMM_LEN];

It's been on my TODO list for a while to fix the rest of the file...

Thanks,
Steve

> +	} task_info;
> +
>  	/** @state: Group state. */
>  	enum panthor_group_state state;
>  
> @@ -3389,6 +3398,14 @@ group_create_queue(struct panthor_group *group,
>  	return ERR_PTR(ret);
>  }
>  
> +static void group_init_task_info(struct panthor_group *group)
> +{
> +	struct task_struct *task = current->group_leader;
> +
> +	group->task_info.pid = task->pid;
> +	get_task_comm(group->task_info.comm, task);
> +}
> +
>  static void add_group_kbo_sizes(struct panthor_device *ptdev,
>  				struct panthor_group *group)
>  {
> @@ -3540,6 +3557,8 @@ int panthor_group_create(struct panthor_file *pfile,
>  	add_group_kbo_sizes(group->ptdev, group);
>  	spin_lock_init(&group->fdinfo.lock);
>  
> +	group_init_task_info(group);
> +
>  	return gid;
>  
>  err_put_group:


  parent reply	other threads:[~2025-07-17 15:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-13  3:08 [PATCH v2 0/3] panthor: print task pid and comm on gpu errors Chia-I Wu
2025-07-13  3:08 ` [PATCH v2 1/3] panthor: set owner field for driver fops Chia-I Wu
2025-07-13  3:08 ` [PATCH v2 2/3] panthor: save task pid and comm in panthor_group Chia-I Wu
2025-07-13  5:10   ` kernel test robot
2025-07-17 15:24   ` Steven Price [this message]
2025-07-13  3:08 ` [PATCH v2 3/3] panthor: dump task pid and comm on gpu errors Chia-I Wu
2025-07-17 15:24   ` Steven Price

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2aee25e2-b9cd-4f86-80dd-9d9881c036c8@arm.com \
    --to=steven.price@arm.com \
    --cc=airlied@gmail.com \
    --cc=boris.brezillon@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=olvaffe@gmail.com \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®