mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Tadeusz Struk <tadeusz.struk@linaro.org>
Cc: Hillf Danton <hdanton@sina.com>, Michal Koutny <mkoutny@suse.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	syzbot+e42ae441c3b10acf9e9d@syzkaller.appspotmail.com
Subject: Re: [PATCH] cgroup: don't queue css_release_work if one already pending
Date: Thu, 19 May 2022 22:13:47 -1000	[thread overview]
Message-ID: <YodNu2C5iHKW3UeZ@slm.duckdns.org> (raw)
In-Reply-To: <25fb057a-077f-b601-dcb7-130071c733db@linaro.org>

On Thu, May 19, 2022 at 04:26:51PM -0700, Tadeusz Struk wrote:
> On 5/19/22 04:23, Hillf Danton wrote:
> > On Wed, 18 May 2022 09:48:21 -0700 Tadeusz Struk  wrote:
> > > On 4/22/22 04:05, Michal Koutny wrote:
> > > > On Thu, Apr 21, 2022 at 02:00:56PM -1000, Tejun Heo<tj@kernel.org>  wrote:
> > > > > If this is the case, we need to hold an extra reference to be put by the
> > > > > css_killed_work_fn(), right?
> > That put could trigger INIT_WORK in css_release() and warning [1]
> > on init active (active state 0) object OTOH as the same
> > css->destroy_work is used in both kill and release pathes.

Hmm... wouldn't the extra reference keep release from happening?

> Will this help if there would be two WQs, one for the css_release path
> and one for the rcu_work?
> 
> diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
> index adb820e98f24..a4873b33e488 100644
> --- a/kernel/cgroup/cgroup.c
> +++ b/kernel/cgroup/cgroup.c
> @@ -124,6 +124,7 @@ DEFINE_PERCPU_RWSEM(cgroup_threadgroup_rwsem);
>   * which may lead to deadlock.
>   */
>  static struct workqueue_struct *cgroup_destroy_wq;
> +static struct workqueue_struct *cgroup_destroy_rcu_wq;

I don't understand why this would help. Care to elaborate?

Thanks.

-- 
tejun

  reply	other threads:[~2022-05-20  8:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12 19:24 Tadeusz Struk
2022-04-14 16:44 ` Michal Koutný
2022-04-14 17:51   ` Tadeusz Struk
2022-04-21 23:43     ` Tejun Heo
2022-04-22  0:00   ` Tejun Heo
2022-04-22 11:05     ` Michal Koutný
2022-05-18 16:48       ` Tadeusz Struk
     [not found]       ` <20220519112319.2455-1-hdanton@sina.com>
2022-05-19 23:26         ` Tadeusz Struk
2022-05-20  8:13           ` Tejun Heo [this message]
2022-05-20 16:38             ` Tadeusz Struk
2022-05-20 16:42               ` Michal Koutný
2022-05-20 16:56                 ` Tadeusz Struk
2022-05-23 19:00                 ` Tadeusz Struk
2022-05-23 19:02                   ` Tejun Heo
2022-05-23 19:08                     ` Tadeusz Struk
2022-05-23 20:05                       ` Tadeusz Struk
2022-05-23 21:27 ` [PATCH v2] cgroups: separate destroy_work into two separate wq Tadeusz Struk
     [not found] <20220413095606.1182-1-hdanton@sina.com>
2022-04-13 15:39 ` [PATCH] cgroup: don't queue css_release_work if one already pending Tadeusz Struk

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=YodNu2C5iHKW3UeZ@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=hdanton@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mkoutny@suse.com \
    --cc=syzbot+e42ae441c3b10acf9e9d@syzkaller.appspotmail.com \
    --cc=tadeusz.struk@linaro.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 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®