netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix problem with static_key decrement
@ 2012-04-19 22:49 Glauber Costa
       [not found] ` <1334875758-20939-1-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Glauber Costa @ 2012-04-19 22:49 UTC (permalink / raw)
  To: Tejun Heo
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, cgroups-u79uwXL29TY76Z2rM5mHXA,
	Li Zefan, kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A, David Miller,
	devel-GEFAQzZX7r8dnm+yROfE0A

Hi,

This is my proposed fix for the sock memcg static_key
problem raised by Kamezawa. It works for me, but I would
Kame, please confirm.

For that to work, I am dependent on two cgroup patches
that goes attached. The rationale behind it, is that we
can't do static_key updates with the cgroup_mutex held,
or we risk deadlocking.

Looking closely, there seem to be no particular reason
to hold the cgroup_mutex during destruction. Subsystems
that really need it, can hold it themselves.

Tejun, let me know if this is acceptable from your PoV.

Glauber Costa (3):
  don't attach a task to a dead cgroup
  don't take cgroup_mutex in destroy()
  decrement static keys on real destroy time

 block/blk-cgroup.c        |    2 +
 include/net/sock.h        |    9 +++++++
 kernel/cgroup.c           |   12 ++++++----
 kernel/cpuset.c           |    2 +
 mm/memcontrol.c           |   20 +++++++++++++++-
 net/ipv4/tcp_memcontrol.c |   52 ++++++++++++++++++++++++++++++++++++++------
 6 files changed, 83 insertions(+), 14 deletions(-)

-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2012-04-23 16:36 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-19 22:49 [PATCH 0/3] Fix problem with static_key decrement 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
     [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-19 22:49   ` [PATCH 2/3] don't take cgroup_mutex in destroy() Glauber Costa
     [not found]     ` <1334875758-20939-3-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-04-19 22:57       ` Tejun Heo
     [not found]         ` <20120419225704.GE10553-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-04-20  0:30           ` Li Zefan
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-19 22:49   ` [PATCH 3/3] decrement static keys on real destroy time 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-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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).