diff options
| author | KAMEZAWA Hiroyuki <[email protected]> | 2010-03-05 13:41:40 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2010-03-06 11:26:24 -0800 |
| commit | 34e55232e59f7b19050267a05ff1226e5cd122a5 (patch) | |
| tree | 6b94e776e87d2a2fe1ceca7c5606901575323900 /tools/perf/scripts/python | |
| parent | d559db086ff5be9bcc259e5aa50bf3d881eaf1d1 (diff) | |
mm: avoid false sharing of mm_counter
Considering the nature of per mm stats, it's the shared object among
threads and can be a cache-miss point in the page fault path.
This patch adds per-thread cache for mm_counter. RSS value will be
counted into a struct in task_struct and synchronized with mm's one at
events.
Now, in this patch, the event is the number of calls to handle_mm_fault.
Per-thread value is added to mm at each 64 calls.
rough estimation with small benchmark on parallel thread (2threads) shows
[before]
4.5 cache-miss/faults
[after]
4.0 cache-miss/faults
Anyway, the most contended object is mmap_sem if the number of threads grows.
[[email protected]: coding-style fixes]
Signed-off-by: KAMEZAWA Hiroyuki <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Lee Schermerhorn <[email protected]>
Cc: David Rientjes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions