All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Stone <daniel@fooishbar.org>
To: "Christian König" <christian.koenig@amd.com>
Cc: Rob Clark <robdclark@chromium.org>,
	"Sharma, Shashank" <shashank.sharma@amd.com>,
	Amaranath Somalapuram <amaranath.somalapuram@amd.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	amd-gfx list <amd-gfx@lists.freedesktop.org>,
	Alexandar Deucher <alexander.deucher@amd.com>,
	Shashank Sharma <contactshashanksharma@gmail.com>
Subject: Re: [PATCH v2 1/2] drm: Add GPU reset sysfs event
Date: Thu, 17 Mar 2022 10:31:37 +0000	[thread overview]
Message-ID: <CAPj87rNUJzTtRSM62aq2ssLY0F673dpaFw2SGh8oMuf3yE6wBA@mail.gmail.com> (raw)
In-Reply-To: <f291b94d-b981-5cfb-5422-ca4317d24eda@amd.com>

Hi,

On Thu, 17 Mar 2022 at 09:21, Christian König <christian.koenig@amd.com> wrote:
> Am 17.03.22 um 09:42 schrieb Sharma, Shashank:
> >> AFAIU you probably want to be passing around a `struct pid *`, and
> >> then somehow use pid_vnr() in the context of the process reading the
> >> event to get the numeric pid.  Otherwise things will not do what you
> >> expect if the process triggering the crash is in a different pid
> >> namespace from the compositor.
> >
> > I am not sure if it is a good idea to add the pid extraction
> > complexity in here, it is left upto the driver to extract this
> > information and pass it to the work queue. In case of AMDGPU, its
> > extracted from GPU VM. It would be then more flexible for the drivers
> > as well.
>
> Yeah, but that is just used for debugging.
>
> If we want to use the pid for housekeeping, like for a daemon which
> kills/restarts processes, we absolutely need that or otherwise won't be
> able to work with containers.

100% this.

Pushing back to the compositor is a red herring. The compositor is
just a service which tries to handle window management and input. If
you're looking to kill the offending process or whatever, then that
should go through the session manager - be it systemd or something
container-centric or whatever. At least that way it can deal with
cgroups at the same time, unlike the compositor which is not really
aware of what the thing on the other end of the socket is doing. This
ties in with the support they already have for things like coredump
analysis, and would also be useful for other devices.

Some environments combine compositor and session manager, and a lot of
them have them strongly related, but they're very definitely not the
same thing ...

Cheers,
Daniel

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Stone <daniel@fooishbar.org>
To: "Christian König" <christian.koenig@amd.com>
Cc: Rob Clark <robdclark@chromium.org>,
	"Sharma, Shashank" <shashank.sharma@amd.com>,
	Amaranath Somalapuram <amaranath.somalapuram@amd.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Rob Clark <robdclark@gmail.com>,
	amd-gfx list <amd-gfx@lists.freedesktop.org>,
	Alexandar Deucher <alexander.deucher@amd.com>,
	Shashank Sharma <contactshashanksharma@gmail.com>
Subject: Re: [PATCH v2 1/2] drm: Add GPU reset sysfs event
Date: Thu, 17 Mar 2022 10:31:37 +0000	[thread overview]
Message-ID: <CAPj87rNUJzTtRSM62aq2ssLY0F673dpaFw2SGh8oMuf3yE6wBA@mail.gmail.com> (raw)
In-Reply-To: <f291b94d-b981-5cfb-5422-ca4317d24eda@amd.com>

Hi,

On Thu, 17 Mar 2022 at 09:21, Christian König <christian.koenig@amd.com> wrote:
> Am 17.03.22 um 09:42 schrieb Sharma, Shashank:
> >> AFAIU you probably want to be passing around a `struct pid *`, and
> >> then somehow use pid_vnr() in the context of the process reading the
> >> event to get the numeric pid.  Otherwise things will not do what you
> >> expect if the process triggering the crash is in a different pid
> >> namespace from the compositor.
> >
> > I am not sure if it is a good idea to add the pid extraction
> > complexity in here, it is left upto the driver to extract this
> > information and pass it to the work queue. In case of AMDGPU, its
> > extracted from GPU VM. It would be then more flexible for the drivers
> > as well.
>
> Yeah, but that is just used for debugging.
>
> If we want to use the pid for housekeeping, like for a daemon which
> kills/restarts processes, we absolutely need that or otherwise won't be
> able to work with containers.

100% this.

Pushing back to the compositor is a red herring. The compositor is
just a service which tries to handle window management and input. If
you're looking to kill the offending process or whatever, then that
should go through the session manager - be it systemd or something
container-centric or whatever. At least that way it can deal with
cgroups at the same time, unlike the compositor which is not really
aware of what the thing on the other end of the socket is doing. This
ties in with the support they already have for things like coredump
analysis, and would also be useful for other devices.

Some environments combine compositor and session manager, and a lot of
them have them strongly related, but they're very definitely not the
same thing ...

Cheers,
Daniel

  reply	other threads:[~2022-03-17 10:31 UTC|newest]

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08 18:04 [PATCH v2 1/2] drm: Add GPU reset sysfs event Shashank Sharma
2022-03-08 18:04 ` [PATCH v2 2/2] drm/amdgpu: add work function for GPU reset event Shashank Sharma
2022-03-09  7:47 ` [PATCH v2 1/2] drm: Add GPU reset sysfs event Simon Ser
2022-03-09 11:18   ` Sharma, Shashank
2022-03-09  8:09 ` Christian König
2022-03-09  9:56 ` Pierre-Eric Pelloux-Prayer
2022-03-09 10:10   ` Simon Ser
2022-03-09 10:24     ` Christian König
2022-03-09 10:28       ` Simon Ser
2022-03-09 10:28       ` Pierre-Eric Pelloux-Prayer
2022-03-09 18:12 ` Rob Clark
2022-03-10  9:55   ` Christian König
2022-03-10 15:24     ` Rob Clark
2022-03-10 16:21       ` Sharma, Shashank
2022-03-10 16:27         ` Andrey Grodzovsky
2022-03-10 17:16           ` Rob Clark
2022-03-10 17:10         ` Rob Clark
2022-03-10 17:19           ` Sharma, Shashank
2022-03-10 17:40             ` Rob Clark
2022-03-10 18:33               ` Abhinav Kumar
2022-03-10 19:14                 ` Sharma, Shashank
2022-03-10 19:35                   ` Rob Clark
2022-03-10 19:44                     ` Sharma, Shashank
2022-03-10 19:56                       ` Rob Clark
2022-03-10 20:17                         ` Sharma, Shashank
2022-03-11  8:30                         ` Pekka Paalanen
2022-03-14 14:23                           ` Alex Deucher
2022-03-14 14:23                             ` Alex Deucher
2022-03-14 15:26                             ` Pekka Paalanen
2022-03-14 15:26                               ` Pekka Paalanen
2022-03-15 14:54                               ` Alex Deucher
2022-03-15 14:54                                 ` Alex Deucher
2022-03-16  8:48                                 ` Pekka Paalanen
2022-03-16  8:48                                   ` Pekka Paalanen
2022-03-16 14:12                                   ` Alex Deucher
2022-03-16 14:12                                     ` Alex Deucher
2022-03-16 15:36                                     ` Rob Clark
2022-03-16 15:36                                       ` Rob Clark
2022-03-16 15:48                                       ` Alex Deucher
2022-03-16 15:48                                         ` Alex Deucher
2022-03-16 16:30                                         ` Rob Clark
2022-03-16 16:30                                           ` Rob Clark
2022-03-17  7:03                                       ` Christian König
2022-03-17  7:03                                         ` Christian König
2022-03-17  9:29                                         ` Daniel Vetter
2022-03-17  9:29                                           ` Daniel Vetter
2022-03-17  9:46                                           ` Christian König
2022-03-17  9:46                                             ` Christian König
2022-03-17 15:34                                           ` Rob Clark
2022-03-17 15:34                                             ` Rob Clark
2022-03-17 17:23                                             ` Daniel Vetter
2022-03-17 17:23                                               ` Daniel Vetter
2022-03-17 15:40                                           ` Rob Clark
2022-03-17 15:40                                             ` Rob Clark
2022-03-17 17:26                                             ` Daniel Vetter
2022-03-17 17:26                                               ` Daniel Vetter
2022-03-17 17:31                                               ` Rob Clark
2022-03-17 17:31                                                 ` Rob Clark
2022-03-18  7:42                                                 ` Christian König
2022-03-18  7:42                                                   ` Christian König
2022-03-18 15:12                                                   ` Rob Clark
2022-03-18 15:12                                                     ` Rob Clark
2022-03-21  9:30                                                     ` Christian König
2022-03-21  9:30                                                       ` Christian König
2022-03-21 16:03                                                       ` Rob Clark
2022-03-21 16:03                                                         ` Rob Clark
2022-03-23 14:07                                                         ` Daniel Stone
2022-03-23 15:14                                                           ` Daniel Vetter
2022-03-23 15:14                                                             ` Daniel Vetter
2022-03-23 15:25                                                             ` Christian König
2022-03-23 15:25                                                               ` Christian König
2022-03-26  0:53                                                               ` Olsak, Marek
2022-03-26  0:53                                                                 ` Olsak, Marek
2022-03-29 12:14                                                                 ` Christian König
2022-03-29 12:14                                                                   ` Christian König
2022-03-29 16:25                                                                   ` Marek Olšák
2022-03-29 16:25                                                                     ` Marek Olšák
2022-03-30  9:49                                                                     ` Daniel Vetter
2022-03-30  9:49                                                                       ` Daniel Vetter
2022-03-23 17:30                                                             ` Rob Clark
2022-03-23 17:30                                                               ` Rob Clark
2022-03-21 14:15                                                     ` Daniel Vetter
2022-03-21 14:15                                                       ` Daniel Vetter
2022-03-15  7:13                             ` Dave Airlie
2022-03-15  7:13                               ` Dave Airlie
2022-03-15  7:25                               ` Simon Ser
2022-03-15  7:25                                 ` Simon Ser
2022-03-15  7:25                               ` Christian König
2022-03-15  7:25                                 ` Christian König
2022-03-17  9:25                             ` Daniel Vetter
2022-03-16 21:50 ` Rob Clark
2022-03-17  8:42   ` Sharma, Shashank
2022-03-17  9:21     ` Christian König
2022-03-17 10:31       ` Daniel Stone [this message]
2022-03-17 10:31         ` Daniel Stone

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=CAPj87rNUJzTtRSM62aq2ssLY0F673dpaFw2SGh8oMuf3yE6wBA@mail.gmail.com \
    --to=daniel@fooishbar.org \
    --cc=alexander.deucher@amd.com \
    --cc=amaranath.somalapuram@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=contactshashanksharma@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robdclark@chromium.org \
    --cc=shashank.sharma@amd.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.