mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Li Zefan <lizefan@huawei.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	cgroups@vger.kernel.org, Michal Hocko <mhocko@kernel.org>,
	Vladimir Davydov <vdavydov@virtuozzo.com>
Subject: [GIT PULL] cgroup fixes for v4.6-rc5
Date: Wed, 27 Apr 2016 12:01:35 -0400	[thread overview]
Message-ID: <20160427160135.GN7822@mtj.duckdns.org> (raw)

Hello, Linus.

Two patches to fix a deadlock which can be easily triggered if memcg
charge moving is used.  This bug was introduced while converting
threadgroup locking to a global percpu_rwsem and is caused by cgroup
controller task migration path depending on the ability to create new
kthreads.  cpuset had a similar issue which was fixed by performing
heavy-lifting operations asynchronous to task migration.  The two
patches fix the same issue in memcg in a similar way.  The first patch
makes the mechanism generic and the second relocates memcg charge
moving outside the migration path.

Given that we don't want to perform heavy operations while
writelocking threadgroup lock anyway, moving them out of the way is a
desirable solution.  One thing to note is that the problem was
difficult to debug because lockdep couldn't figure out the deadlock
condition.  Looking into how to improve that.

Thanks.

The following changes since commit bcc981e9ed84c678533299d7eff17d2c81e4d5de:

  Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 (2016-04-25 09:32:45 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-4.6-fixes

for you to fetch changes up to 264a0ae164bc0e9144bebcd25ff030d067b1a878:

  memcg: relocate charge moving from ->attach to ->post_attach (2016-04-25 15:45:14 -0400)

----------------------------------------------------------------
Tejun Heo (2):
      cgroup, cpuset: replace cpuset_post_attach_flush() with cgroup_subsys->post_attach callback
      memcg: relocate charge moving from ->attach to ->post_attach

 include/linux/cgroup-defs.h |  1 +
 include/linux/cpuset.h      |  6 ------
 kernel/cgroup.c             |  7 +++++--
 kernel/cpuset.c             |  4 ++--
 mm/memcontrol.c             | 37 +++++++++++++++++++------------------
 5 files changed, 27 insertions(+), 28 deletions(-)

-- 
tejun

                 reply	other threads:[~2016-04-27 16:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20160427160135.GN7822@mtj.duckdns.org \
    --to=tj@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=mhocko@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vdavydov@virtuozzo.com \
    /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®