diff options
author | KAMEZAWA Hiroyuki <[email protected]> | 2012-03-21 16:34:23 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2012-03-21 17:55:01 -0700 |
commit | 619d094b5872a5af153f1af77a8b7f7326faf0d0 (patch) | |
tree | 4de9ff8640d8cee092800cd722e621ea2db63640 /tools/perf/scripts/python/syscall-counts-by-pid.py | |
parent | 9e3357907c84517d9e07bc0b19265807f0264b43 (diff) |
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 <[email protected]>
Acked-by: Greg Thelen <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Cc: Ying Han <[email protected]>
Cc: "Paul E. McKenney" <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts-by-pid.py')
0 files changed, 0 insertions, 0 deletions