diff options
| author | Waiman Long <[email protected]> | 2014-08-06 16:05:38 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2014-08-06 18:01:17 -0700 |
| commit | 3a79d52aa3c63c939f5a1f86e80e634f84e987c4 (patch) | |
| tree | ea352191eb8bc6afbc98ac3b54d573c1db615c78 /tools/perf/scripts/python/netdev-times.py | |
| parent | f8303c2582b889351e261ff18c4d8eb197a77db2 (diff) | |
mm, thp: replace smp_mb after atomic_add by smp_mb__after_atomic
In some architectures like x86, atomic_add() is a full memory barrier.
In that case, an additional smp_mb() is just a waste of time. This
patch replaces that smp_mb() by smp_mb__after_atomic() which will avoid
the redundant memory barrier in some architectures.
With a 3.16-rc1 based kernel, this patch reduced the execution time of
breaking 1000 transparent huge pages from 38,245us to 30,964us. A
reduction of 19% which is quite sizeable. It also reduces the %cpu time
of the __split_huge_page_refcount function in the perf profile from
2.18% to 1.15%.
Signed-off-by: Waiman Long <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Scott J Norton <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions