From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Glauber Costa <glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org,
David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
devel-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org,
Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH 2/3] don't take cgroup_mutex in destroy()
Date: Thu, 19 Apr 2012 15:57:04 -0700 [thread overview]
Message-ID: <20120419225704.GE10553@google.com> (raw)
In-Reply-To: <1334875758-20939-3-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
On Thu, Apr 19, 2012 at 07:49:17PM -0300, Glauber Costa wrote:
> Most of the destroy functions are only doing very simple things
> like freeing memory.
>
> The ones who goes through lists and such, already use its own
> locking for those.
>
> * The cgroup itself won't go away until we free it, (after destroy)
> * The parent won't go away because we hold a reference count
> * There are no more tasks in the cgroup, and the cgroup is declared
> dead (cgroup_is_removed() == true)
>
> For the blk-cgroup and the cpusets, I got the impression that the mutex
> is still necessary.
>
> For those, I grabbed it from within the destroy function itself.
>
> If the maintainer for those subsystems consider it safe to remove
> it, we can discuss it separately.
I really don't like cgroup_lock() usage spreading more. It's
something which should be contained in cgroup.c proper. I looked at
the existing users a while ago and they seemed to be compensating
deficencies in API, so, if at all possible, let's not spread the
disease.
Thanks.
--
tejun
next prev parent reply other threads:[~2012-04-19 22:57 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-19 22:49 [PATCH 0/3] Fix problem with static_key decrement Glauber Costa
2012-04-19 22:49 ` Glauber Costa
[not found] ` <1334875758-20939-1-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-04-19 22:49 ` [PATCH 1/3] don't attach a task to a dead cgroup Glauber Costa
2012-04-19 22:49 ` Glauber Costa
[not found] ` <1334875758-20939-2-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-04-19 22:53 ` Tejun Heo
2012-04-20 15:05 ` Glauber Costa
2012-04-20 15:05 ` Glauber Costa
2012-04-19 22:49 ` [PATCH 2/3] don't take cgroup_mutex in destroy() Glauber Costa
2012-04-19 22:49 ` Glauber Costa
[not found] ` <1334875758-20939-3-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-04-19 22:57 ` Tejun Heo [this message]
[not found] ` <20120419225704.GE10553-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-04-20 0:30 ` Li Zefan
2012-04-20 15:04 ` Glauber Costa
2012-04-20 15:04 ` Glauber Costa
[not found] ` <4F917AEB.7080404-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-04-21 6:47 ` Li Zefan
[not found] ` <4F9257F4.2070505-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2012-04-23 16:36 ` Glauber Costa
2012-04-23 16:36 ` Glauber Costa
2012-04-19 22:49 ` [PATCH 3/3] decrement static keys on real destroy time Glauber Costa
2012-04-19 22:49 ` Glauber Costa
[not found] ` <1334875758-20939-4-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-04-20 7:38 ` KAMEZAWA Hiroyuki
[not found] ` <4F911289.1050403-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2012-04-20 19:39 ` Glauber Costa
2012-04-20 19:39 ` Glauber Costa
2012-04-19 22:54 ` [PATCH 0/3] Fix problem with static_key decrement Tejun Heo
[not found] ` <20120419225441.GD10553-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-04-20 15:01 ` Glauber Costa
2012-04-20 15:01 ` Glauber Costa
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=20120419225704.GE10553@google.com \
--to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=devel-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
--cc=glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org \
--cc=kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org \
--cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.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.