All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Tejun Heo <tj@kernel.org>
Cc: Zefan Li <lizefan.x@bytedance.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	cgroups@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/1] cgroup: avoid the unnecessary list_add(dying_tasks) in cgroup_exit()
Date: Mon, 17 Jun 2024 16:31:29 +0200	[thread overview]
Message-ID: <20240617143129.GA10395@redhat.com> (raw)

Hello,

Sorry for delay and for confusing you in our previous discussion
here https://lore.kernel.org/all/20240610105028.GA21586@redhat.com/

No, cgroup_exit() can't rely on group_dead, this is racy.

And no, we can't shift css_set_skip_task_iters/etc from cgroup_release()
to cgroup_exit(), an execing sub-thread can change the group leader.

Let me at least send the simple patch which looks "obviously good" to me.

I would really like to remove the usage of signal->live in cgroup.c, but
so far I do not see a simple solution.

With or without this change cgroup.procs can be empty but cgroup.threads
is not. But at least the exiting sub-threads which have already passed
atomic_dec_and_test() should call cgroup_exit() "soon".

Oleg.


             reply	other threads:[~2024-06-17 14:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17 14:31 Oleg Nesterov [this message]
2024-06-17 14:31 ` [PATCH 1/1] cgroup: avoid the unnecessary list_add(dying_tasks) in cgroup_exit() Oleg Nesterov
2024-06-19 17:33   ` Tejun Heo

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=20240617143129.GA10395@redhat.com \
    --to=oleg@redhat.com \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan.x@bytedance.com \
    --cc=tj@kernel.org \
    /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.