From: "André Almeida" <andrealmeid@igalia.com>
To: Simon Ser <contact@emersion.fr>, Pekka Paalanen <ppaalanen@gmail.com>
Cc: pierre-eric.pelloux-prayer@amd.com,
"Daniel Vetter" <daniel@ffwll.ch>,
"'Marek Olšák'" <maraeo@gmail.com>,
"Andrey Grodzovsky" <andrey.grodzovsky@amd.com>,
amaranath.somalapuram@amd.com, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org, "Rob Clark" <robdclark@gmail.com>,
"Daniel Stone" <daniel@fooishbar.org>,
dri-devel@lists.freedesktop.org, kernel-dev@igalia.com,
alexander.deucher@amd.com, contactshashanksharma@gmail.com,
"Dave Airlie" <airlied@gmail.com>,
christian.koenig@amd.com,
"Pierre-Loup A . Griffais" <pgriffais@valvesoftware.com>
Subject: Re: [PATCH v3 0/2] drm: Add GPU reset sysfs
Date: Wed, 30 Nov 2022 12:23:35 -0300 [thread overview]
Message-ID: <2dbf222e-7694-ea5e-c35d-663011c16e84@igalia.com> (raw)
In-Reply-To: <584UdQAqoPr4vSxCTJg70LFQm--HpHH-EhnAo78lRAZ89OnrDkUeKlTnDGT_DMzDT3PeEtmXNsrqB6GuiV4TsZv3pBU8kFWjyPLWGrevIMw=@emersion.fr>
On 11/28/22 06:30, Simon Ser wrote:
> The PID is racy, the user-space daemon could end up killing an
> unrelated process… Is there any way we could use a pidfd instead?
Is the PID race condition something that really happens or rather
something theoretical?
Anyway, I can't see how pidfd and uevent would work together. Since
uevent it's kind of a broadcast and pidfd is an anon file, it wouldn't
be possible to say to userspace which is the fd to be used giving that
file descriptors are per process resources.
On the other hand, this interface could be converted to be an ioctl that
userspace would block waiting for a reset notification, then the kernel
could create a pidfd and give to the blocked process the right fd. We
would probably need a queue to make sure no event is lost.
Thanks
André
WARNING: multiple messages have this Message-ID (diff)
From: "André Almeida" <andrealmeid@igalia.com>
To: Simon Ser <contact@emersion.fr>, Pekka Paalanen <ppaalanen@gmail.com>
Cc: pierre-eric.pelloux-prayer@amd.com,
"'Marek Olšák'" <maraeo@gmail.com>,
"Andrey Grodzovsky" <andrey.grodzovsky@amd.com>,
amaranath.somalapuram@amd.com, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
kernel-dev@igalia.com, alexander.deucher@amd.com,
contactshashanksharma@gmail.com, christian.koenig@amd.com,
"Pierre-Loup A . Griffais" <pgriffais@valvesoftware.com>
Subject: Re: [PATCH v3 0/2] drm: Add GPU reset sysfs
Date: Wed, 30 Nov 2022 12:23:35 -0300 [thread overview]
Message-ID: <2dbf222e-7694-ea5e-c35d-663011c16e84@igalia.com> (raw)
In-Reply-To: <584UdQAqoPr4vSxCTJg70LFQm--HpHH-EhnAo78lRAZ89OnrDkUeKlTnDGT_DMzDT3PeEtmXNsrqB6GuiV4TsZv3pBU8kFWjyPLWGrevIMw=@emersion.fr>
On 11/28/22 06:30, Simon Ser wrote:
> The PID is racy, the user-space daemon could end up killing an
> unrelated process… Is there any way we could use a pidfd instead?
Is the PID race condition something that really happens or rather
something theoretical?
Anyway, I can't see how pidfd and uevent would work together. Since
uevent it's kind of a broadcast and pidfd is an anon file, it wouldn't
be possible to say to userspace which is the fd to be used giving that
file descriptors are per process resources.
On the other hand, this interface could be converted to be an ioctl that
userspace would block waiting for a reset notification, then the kernel
could create a pidfd and give to the blocked process the right fd. We
would probably need a queue to make sure no event is lost.
Thanks
André
WARNING: multiple messages have this Message-ID (diff)
From: "André Almeida" <andrealmeid@igalia.com>
To: Simon Ser <contact@emersion.fr>, Pekka Paalanen <ppaalanen@gmail.com>
Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
linux-kernel@vger.kernel.org, kernel-dev@igalia.com,
alexander.deucher@amd.com, contactshashanksharma@gmail.com,
amaranath.somalapuram@amd.com, christian.koenig@amd.com,
pierre-eric.pelloux-prayer@amd.com,
"Rob Clark" <robdclark@gmail.com>,
"Andrey Grodzovsky" <andrey.grodzovsky@amd.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Daniel Stone" <daniel@fooishbar.org>,
"'Marek Olšák'" <maraeo@gmail.com>,
"Dave Airlie" <airlied@gmail.com>,
"Pierre-Loup A . Griffais" <pgriffais@valvesoftware.com>
Subject: Re: [PATCH v3 0/2] drm: Add GPU reset sysfs
Date: Wed, 30 Nov 2022 12:23:35 -0300 [thread overview]
Message-ID: <2dbf222e-7694-ea5e-c35d-663011c16e84@igalia.com> (raw)
In-Reply-To: <584UdQAqoPr4vSxCTJg70LFQm--HpHH-EhnAo78lRAZ89OnrDkUeKlTnDGT_DMzDT3PeEtmXNsrqB6GuiV4TsZv3pBU8kFWjyPLWGrevIMw=@emersion.fr>
On 11/28/22 06:30, Simon Ser wrote:
> The PID is racy, the user-space daemon could end up killing an
> unrelated process… Is there any way we could use a pidfd instead?
Is the PID race condition something that really happens or rather
something theoretical?
Anyway, I can't see how pidfd and uevent would work together. Since
uevent it's kind of a broadcast and pidfd is an anon file, it wouldn't
be possible to say to userspace which is the fd to be used giving that
file descriptors are per process resources.
On the other hand, this interface could be converted to be an ioctl that
userspace would block waiting for a reset notification, then the kernel
could create a pidfd and give to the blocked process the right fd. We
would probably need a queue to make sure no event is lost.
Thanks
André
next prev parent reply other threads:[~2022-11-30 15:24 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-25 17:52 [PATCH v3 0/2] drm: Add GPU reset sysfs André Almeida
2022-11-25 17:52 ` André Almeida
2022-11-25 17:52 ` André Almeida
2022-11-25 17:52 ` [PATCH v3 1/2] drm: Add GPU reset sysfs event André Almeida
2022-11-25 17:52 ` André Almeida
2022-11-25 17:52 ` André Almeida
2022-11-28 9:27 ` Pekka Paalanen
2022-11-28 9:27 ` Pekka Paalanen
2022-11-28 9:27 ` Pekka Paalanen
2022-11-29 14:07 ` Alex Deucher
2022-11-29 14:07 ` Alex Deucher
2022-11-29 14:07 ` Alex Deucher
2022-11-25 17:52 ` [PATCH v3 2/2] drm/amdgpu: Add work function for GPU reset event André Almeida
2022-11-25 17:52 ` André Almeida
2022-11-25 17:52 ` André Almeida
2022-11-28 9:25 ` [PATCH v3 0/2] drm: Add GPU reset sysfs Pekka Paalanen
2022-11-28 9:25 ` Pekka Paalanen
2022-11-28 9:25 ` Pekka Paalanen
2022-11-28 9:30 ` Simon Ser
2022-11-28 9:30 ` Simon Ser
2022-11-28 9:30 ` Simon Ser
2022-11-30 15:23 ` André Almeida [this message]
2022-11-30 15:23 ` André Almeida
2022-11-30 15:23 ` André Almeida
2022-11-30 15:34 ` Simon Ser
2022-11-30 15:34 ` Simon Ser
2022-11-30 15:34 ` Simon Ser
2022-11-30 11:11 ` Daniel Vetter
2022-11-30 11:11 ` Daniel Vetter
2022-11-30 11:11 ` Daniel Vetter
2022-12-08 4:53 ` Alex Deucher
2023-01-05 12:25 ` Daniel Vetter
2023-01-05 12:25 ` Daniel Vetter
2023-01-05 12:25 ` Daniel Vetter
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=2dbf222e-7694-ea5e-c35d-663011c16e84@igalia.com \
--to=andrealmeid@igalia.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amaranath.somalapuram@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=andrey.grodzovsky@amd.com \
--cc=christian.koenig@amd.com \
--cc=contact@emersion.fr \
--cc=contactshashanksharma@gmail.com \
--cc=daniel@ffwll.ch \
--cc=daniel@fooishbar.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-dev@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maraeo@gmail.com \
--cc=pgriffais@valvesoftware.com \
--cc=pierre-eric.pelloux-prayer@amd.com \
--cc=ppaalanen@gmail.com \
--cc=robdclark@gmail.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.