summaryrefslogtreecommitdiff
path: root/block/bsg-lib.c
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2012-03-21 23:34:23 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-22 00:55:01 (GMT)
commit619d094b5872a5af153f1af77a8b7f7326faf0d0 (patch)
tree4de9ff8640d8cee092800cd722e621ea2db63640 /block/bsg-lib.c
parent9e3357907c84517d9e07bc0b19265807f0264b43 (diff)
downloadlinux-619d094b5872a5af153f1af77a8b7f7326faf0d0.tar.xz
memcg: simplify move_account() check
In memcg, for avoiding take-lock-irq-off at accessing page_cgroup, a logic, flag + rcu_read_lock(), is used. This works as following CPU-A CPU-B rcu_read_lock() set flag if(flag is set) take heavy lock do job. synchronize_rcu() rcu_read_unlock() take heavy lock. In recent discussion, it's argued that using per-cpu value for this flag just complicates the code because 'set flag' is very rare. This patch changes 'flag' implementation from percpu to atomic_t. This will be much simpler. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Greg Thelen <gthelen@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.cz> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Ying Han <yinghan@google.com> Cc: "Paul E. McKenney" <paulmck@us.ibm.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'block/bsg-lib.c')
0 files changed, 0 insertions, 0 deletions