mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Tycho Andersen <tycho@tycho.pizza>
Cc: Oleg Nesterov <oleg@redhat.com>,
	Andy Lutomirski <luto@amacapital.net>,
	 "Eric W. Biederman" <ebiederm@xmission.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pidfd: exit: kill the no longer used thread_group_exited()
Date: Wed, 7 Feb 2024 09:45:15 +0100	[thread overview]
Message-ID: <20240207-fenster-strotzen-b31de9bee30b@brauner> (raw)
In-Reply-To: <ZcJmiBxpaElivX2J@tycho.pizza> <ZcJmbUzox6Rd3587@tycho.pizza>

On Tue, Feb 06, 2024 at 10:04:08AM -0700, Tycho Andersen wrote:
> On Mon, Feb 05, 2024 at 06:43:47PM +0100, Oleg Nesterov wrote:
> > It was used by pidfd_poll() but now it has no callers.
> > 
> > If it finally finds a modular user we can revert this change, but note
> > that the comment above this helper and the changelog in 38fd525a4c61
> > ("exit: Factor thread_group_exited out of pidfd_poll") are not accurate,
> > thread_group_exited() won't return true if all other threads have passed
> > exit_notify() and are zombies, it returns true only when all other threads
> > are completely gone. Not to mention that it can only work if the task
> > identified by @pid is a thread-group leader.
> > 
> > Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> 
> Reviewed-by: Tycho Andersen <tandersen@netflix.com>

On Tue, Feb 06, 2024 at 10:03:41AM -0700, Tycho Andersen wrote:
> On Mon, Feb 05, 2024 at 03:13:48PM +0100, Oleg Nesterov wrote:
> > rather than wake_up_all(). This way do_notify_pidfd() won't wakeup the
> > POLLHUP-only waiters which wait for pid_task() == NULL.
> > 
> > TODO:
> >     - as Christian pointed out, this asks for the new wake_up_all_poll()
> >       helper, it can already have other users.
> > 
> >     - we can probably discriminate the PIDFD_THREAD and non-PIDFD_THREAD
> >       waiters, but this needs more work. See
> >       https://lore.kernel.org/all/20240205140848.GA15853@redhat.com/
> > 
> > Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> 
> Reviewed-by: Tycho Andersen <tandersen@netflix.com>

I updated the trailers with your RVBs.

  reply	other threads:[~2024-02-07  8:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 14:13 [PATCH] pidfd: change do_notify_pidfd() to use __wake_up(poll_to_key(EPOLLIN)) Oleg Nesterov
2024-02-06 12:53 ` Christian Brauner
2024-02-06 17:03 ` Tycho Andersen
2024-02-07  8:45   ` Christian Brauner [this message]
2024-02-05 17:43 [PATCH] pidfd: exit: kill the no longer used thread_group_exited() Oleg Nesterov
2024-02-06 13:03 ` Christian Brauner
2024-02-06 17:04 ` Tycho Andersen

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=20240207-fenster-strotzen-b31de9bee30b@brauner \
    --to=brauner@kernel.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=oleg@redhat.com \
    --cc=tycho@tycho.pizza \
    /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®