From: Michal Hocko <mhocko@suse.cz>
To: linux-mm@kvack.org
Cc: Balbir Singh <bsingharora@gmail.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] memcg: oom locking updates
Date: Wed, 13 Jul 2011 14:44:38 +0200 [thread overview]
Message-ID: <cover.1310561078.git.mhocko@suse.cz> (raw)
Hi,
this small patch series has two patches. While the first one is a bug
fix the other one is a cleanup which might be a bit controversial.
I have experienced a serious starvation due the way how we handle
oom_lock counter currently and the first patch aims at fixing it. The
issue can be reproduced quite easily on a machine with many CPUs and
many tasks fighting for a memory (e.g. 100 tasks each allocating and
touching 10MB anonymous memory in a tight loop within a 200MB group with
swapoff and mem_control=0)
I have no hard numbers to support why spinlock is better than mutex for
the second patch but it feels like it is more suitable for the code
paths we are using it at the moment. It should also reduce context
switches count for many contenders.
Michal Hocko (2):
memcg: make oom_lock 0 and 1 based rather than coutner
memcg: change memcg_oom_mutex to spinlock
mm/memcontrol.c | 42 ++++++++++++++++++++++++++----------------
1 files changed, 26 insertions(+), 16 deletions(-)
--
1.7.5.4
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2011-07-13 12:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-13 12:44 Michal Hocko [this message]
2011-07-13 11:05 ` [PATCH 1/2] memcg: make oom_lock 0 and 1 based rather than coutner Michal Hocko
2011-07-14 1:02 ` KAMEZAWA Hiroyuki
2011-07-14 2:59 ` KAMEZAWA Hiroyuki
2011-07-14 9:00 ` Michal Hocko
2011-07-14 9:30 ` KAMEZAWA Hiroyuki
2011-07-14 9:51 ` Michal Hocko
2011-07-14 10:17 ` KAMEZAWA Hiroyuki
2011-07-14 11:09 ` Michal Hocko
2011-07-14 11:30 ` Michal Hocko
2011-07-14 11:50 ` KAMEZAWA Hiroyuki
2011-07-14 12:55 ` Michal Hocko
2011-07-14 23:47 ` KAMEZAWA Hiroyuki
2011-07-15 7:28 ` Michal Hocko
2011-07-13 12:32 ` [PATCH 2/2] memcg: change memcg_oom_mutex to spinlock Michal Hocko
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=cover.1310561078.git.mhocko@suse.cz \
--to=mhocko@suse.cz \
--cc=bsingharora@gmail.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nishimura@mxp.nes.nec.co.jp \
/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;
as well as URLs for NNTP newsgroup(s).