[libata/ahci] 8a4aeec8d2d: +138.4% perf-stat.dTLB-store-misses, +37.2% perf-stat.dTLB-load-misses

From: Jet Chen
Date: Mon Apr 21 2014 - 03:31:14 EST


HI Dan,

we noticed the below changes on

git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata for-next
commit 8a4aeec8d2d6a3edeffbdfae451cdf05cbf0fefd ("libata/ahci: accommodate tag ordered controllers")

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
88694337 ~39% +138.4% 2.115e+08 ~46% TOTAL perf-stat.dTLB-store-misses
217057 ~ 0% -31.3% 149221 ~ 3% TOTAL interrupts.46:PCI-MSI-edge.ahci
6.995e+08 ~20% +37.2% 9.598e+08 ~25% TOTAL perf-stat.dTLB-load-misses
110302 ~ 0% -28.9% 78402 ~ 2% TOTAL interrupts.CAL
3.168e+08 ~ 9% +14.5% 3.627e+08 ~10% TOTAL perf-stat.L1-dcache-prefetches
2.553e+09 ~12% +26.5% 3.228e+09 ~11% TOTAL perf-stat.LLC-loads
5.815e+08 ~ 6% +27.3% 7.403e+08 ~11% TOTAL perf-stat.LLC-stores
3.662e+09 ~11% +22.9% 4.501e+09 ~10% TOTAL perf-stat.L1-dcache-load-misses
2.155e+10 ~ 1% +8.3% 2.333e+10 ~ 1% TOTAL perf-stat.L1-dcache-store-misses
3.619e+10 ~ 1% +5.9% 3.832e+10 ~ 2% TOTAL perf-stat.cache-references
1.605e+10 ~ 1% +4.3% 1.674e+10 ~ 1% TOTAL perf-stat.L1-icache-load-misses
239691 ~ 7% -8.4% 219537 ~ 1% TOTAL interrupts.RES
3483 ~ 0% -5.4% 3297 ~ 0% TOTAL vmstat.system.in
2.748e+08 ~ 1% +4.3% 2.865e+08 ~ 0% TOTAL perf-stat.cache-misses
98935369 ~ 0% +4.9% 1.038e+08 ~ 0% TOTAL perf-stat.LLC-store-misses
699 ~ 1% -3.7% 673 ~ 1% TOTAL iostat.sda.w_await
698 ~ 1% -3.7% 672 ~ 1% TOTAL iostat.sda.await
203893 ~ 0% +3.7% 211474 ~ 0% TOTAL iostat.sda.wkB/s
203972 ~ 0% +3.7% 211488 ~ 0% TOTAL vmstat.io.bo
618082 ~ 4% -4.6% 589619 ~ 1% TOTAL perf-stat.context-switches
1.432e+12 ~ 1% +3.0% 1.475e+12 ~ 0% TOTAL perf-stat.L1-icache-loads
3.35e+11 ~ 0% +3.2% 3.456e+11 ~ 0% TOTAL perf-stat.L1-dcache-stores
1.486e+12 ~ 0% +2.8% 1.527e+12 ~ 0% TOTAL perf-stat.iTLB-loads
3.006e+11 ~ 0% +2.6% 3.084e+11 ~ 0% TOTAL perf-stat.branch-instructions
1.793e+12 ~ 0% +2.8% 1.843e+12 ~ 0% TOTAL perf-stat.cpu-cycles
3.352e+11 ~ 1% +2.9% 3.451e+11 ~ 0% TOTAL perf-stat.dTLB-stores
2.994e+11 ~ 1% +3.1% 3.087e+11 ~ 0% TOTAL perf-stat.branch-loads
1.49e+12 ~ 0% +2.9% 1.533e+12 ~ 0% TOTAL perf-stat.instructions
5.48e+11 ~ 0% +2.8% 5.633e+11 ~ 0% TOTAL perf-stat.dTLB-loads
2.028e+11 ~ 1% +2.9% 2.086e+11 ~ 1% TOTAL perf-stat.bus-cycles
5.484e+11 ~ 0% +2.9% 5.644e+11 ~ 0% TOTAL perf-stat.L1-dcache-loads
1.829e+12 ~ 0% +2.7% 1.877e+12 ~ 1% TOTAL perf-stat.ref-cycles

Legend:
~XX% - stddev percent
[+-]XX% - change percent

Attach full stats changes entries for reference.

Thanks,
Jet




mkfs -t ext4 -q /dev/sda1
echo 1 > /sys/kernel/debug/tracing/events/writeback/balance_dirty_pages/enable
echo 1 > /sys/kernel/debug/tracing/events/writeback/bdi_dirty_ratelimit/enable
echo 1 > /sys/kernel/debug/tracing/events/writeback/global_dirty_state/enable
echo 1 > /sys/kernel/debug/tracing/events/writeback/writeback_single_inode/enable
mount -t ext4 /dev/sda1 /fs/sda1
dd if=/dev/zero of=/fs/sda1/zero-1 status=none &
sleep 600
killall -9 dd


2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
1.23 ~ 8% -30.0% 0.86 ~15% bay/micro/dd-write/1HDD-cfq-ext4-1dd
1.23 ~ 8% -30.0% 0.86 ~15% TOTAL perf-profile.cpu-cycles.jbd2_journal_add_journal_head.jbd2_journal_get_write_access.__ext4_journal_get_write_access.ext4_reserve_inode_write.ext4_mark_inode_dirty

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
56347 ~ 0% -26.3% 41535 ~ 5% bay/micro/dd-write/1HDD-cfq-ext4-1dd
56543 ~ 0% -32.9% 37934 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
112890 ~ 0% -29.6% 79469 ~ 2% TOTAL softirqs.BLOCK

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
0.95 ~12% -26.0% 0.70 ~ 7% bay/micro/dd-write/1HDD-cfq-ext4-1dd
0.95 ~12% -26.0% 0.70 ~ 7% TOTAL perf-profile.cpu-cycles.jbd2_journal_put_journal_head.__ext4_handle_dirty_metadata.ext4_mark_iloc_dirty.ext4_mark_inode_dirty.ext4_dirty_inode

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
0.95 ~ 5% -18.2% 0.77 ~24% bay/micro/dd-write/1HDD-cfq-ext4-1dd
0.95 ~ 5% -18.2% 0.77 ~24% TOTAL perf-profile.cpu-cycles.generic_file_aio_write.ext4_file_write.do_sync_write.vfs_write.sys_write

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
2468 ~ 3% +19.5% 2949 ~ 6% bay/micro/dd-write/1HDD-cfq-ext4-1dd
2468 ~ 3% +19.5% 2949 ~ 6% TOTAL proc-vmstat.kswapd_high_wmark_hit_quickly

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
1.52 ~15% +18.6% 1.80 ~ 6% bay/micro/dd-write/1HDD-cfq-xfs-1dd
1.52 ~15% +18.6% 1.80 ~ 6% TOTAL perf-profile.cpu-cycles.write

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
74703 ~ 3% +10.8% 82758 ~ 6% bay/micro/dd-write/1HDD-cfq-ext4-1dd
74703 ~ 3% +10.8% 82758 ~ 6% TOTAL ftrace.balance_dirty_pages.sda.task_ratelimit

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
71536 ~ 1% +10.1% 78793 ~ 4% bay/micro/dd-write/1HDD-cfq-ext4-1dd
71536 ~ 1% +10.1% 78793 ~ 4% TOTAL ftrace.bdi_dirty_ratelimit.sda.task_ratelimit

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
88694337 ~39% +138.4% 2.115e+08 ~46% bay/micro/dd-write/1HDD-cfq-ext4-1dd
88694337 ~39% +138.4% 2.115e+08 ~46% TOTAL perf-stat.dTLB-store-misses

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
108743 ~ 0% -27.7% 78635 ~ 6% bay/micro/dd-write/1HDD-cfq-ext4-1dd
108313 ~ 0% -34.8% 70585 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
217057 ~ 0% -31.3% 149221 ~ 3% TOTAL interrupts.46:PCI-MSI-edge.ahci

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
6.995e+08 ~20% +37.2% 9.598e+08 ~25% bay/micro/dd-write/1HDD-cfq-ext4-1dd
6.995e+08 ~20% +37.2% 9.598e+08 ~25% TOTAL perf-stat.dTLB-load-misses

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
55103 ~ 0% -25.1% 41273 ~ 4% bay/micro/dd-write/1HDD-cfq-ext4-1dd
55198 ~ 0% -32.7% 37128 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
110302 ~ 0% -28.9% 78402 ~ 2% TOTAL interrupts.CAL

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
3.168e+08 ~ 9% +14.5% 3.627e+08 ~10% bay/micro/dd-write/1HDD-cfq-ext4-1dd
3.168e+08 ~ 9% +14.5% 3.627e+08 ~10% TOTAL perf-stat.L1-dcache-prefetches

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
2.553e+09 ~12% +26.5% 3.228e+09 ~11% bay/micro/dd-write/1HDD-cfq-ext4-1dd
2.553e+09 ~12% +26.5% 3.228e+09 ~11% TOTAL perf-stat.LLC-loads

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
5.815e+08 ~ 6% +27.3% 7.403e+08 ~11% bay/micro/dd-write/1HDD-cfq-ext4-1dd
5.815e+08 ~ 6% +27.3% 7.403e+08 ~11% TOTAL perf-stat.LLC-stores

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
3.662e+09 ~11% +22.9% 4.501e+09 ~10% bay/micro/dd-write/1HDD-cfq-ext4-1dd
3.662e+09 ~11% +22.9% 4.501e+09 ~10% TOTAL perf-stat.L1-dcache-load-misses

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
1.153e+10 ~ 2% +12.4% 1.296e+10 ~ 2% bay/micro/dd-write/1HDD-cfq-ext4-1dd
1.002e+10 ~ 0% +3.5% 1.037e+10 ~ 1% bay/micro/dd-write/1HDD-cfq-xfs-1dd
2.155e+10 ~ 1% +8.3% 2.333e+10 ~ 1% TOTAL perf-stat.L1-dcache-store-misses

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
3.619e+10 ~ 1% +5.9% 3.832e+10 ~ 2% bay/micro/dd-write/1HDD-cfq-ext4-1dd
3.619e+10 ~ 1% +5.9% 3.832e+10 ~ 2% TOTAL perf-stat.cache-references

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
1.605e+10 ~ 1% +4.3% 1.674e+10 ~ 1% bay/micro/dd-write/1HDD-cfq-ext4-1dd
1.605e+10 ~ 1% +4.3% 1.674e+10 ~ 1% TOTAL perf-stat.L1-icache-load-misses

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
102668 ~ 1% -4.3% 98275 ~ 2% bay/micro/dd-write/1HDD-cfq-ext4-1dd
137022 ~10% -11.5% 121262 ~ 1% bay/micro/dd-write/1HDD-cfq-xfs-1dd
239691 ~ 7% -8.4% 219537 ~ 1% TOTAL interrupts.RES

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
1727 ~ 0% -4.2% 1654 ~ 0% bay/micro/dd-write/1HDD-cfq-ext4-1dd
1756 ~ 1% -6.5% 1642 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
3483 ~ 0% -5.4% 3297 ~ 0% TOTAL vmstat.system.in

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
2.748e+08 ~ 1% +4.3% 2.865e+08 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
2.748e+08 ~ 1% +4.3% 2.865e+08 ~ 0% TOTAL perf-stat.cache-misses

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
98935369 ~ 0% +4.9% 1.038e+08 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
98935369 ~ 0% +4.9% 1.038e+08 ~ 0% TOTAL perf-stat.LLC-store-misses

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
699 ~ 1% -3.7% 673 ~ 1% bay/micro/dd-write/1HDD-cfq-ext4-1dd
699 ~ 1% -3.7% 673 ~ 1% TOTAL iostat.sda.w_await

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
698 ~ 1% -3.7% 672 ~ 1% bay/micro/dd-write/1HDD-cfq-ext4-1dd
698 ~ 1% -3.7% 672 ~ 1% TOTAL iostat.sda.await

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
101176 ~ 0% +3.4% 104666 ~ 0% bay/micro/dd-write/1HDD-cfq-ext4-1dd
102716 ~ 0% +4.0% 106808 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
203893 ~ 0% +3.7% 211474 ~ 0% TOTAL iostat.sda.wkB/s

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
101269 ~ 0% +3.4% 104694 ~ 0% bay/micro/dd-write/1HDD-cfq-ext4-1dd
102702 ~ 0% +4.0% 106793 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
203972 ~ 0% +3.7% 211488 ~ 0% TOTAL vmstat.io.bo

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
618082 ~ 4% -4.6% 589619 ~ 1% bay/micro/dd-write/1HDD-cfq-xfs-1dd
618082 ~ 4% -4.6% 589619 ~ 1% TOTAL perf-stat.context-switches

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
8.267e+11 ~ 1% +2.5% 8.472e+11 ~ 0% bay/micro/dd-write/1HDD-cfq-ext4-1dd
6.053e+11 ~ 0% +3.8% 6.281e+11 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
1.432e+12 ~ 1% +3.0% 1.475e+12 ~ 0% TOTAL perf-stat.L1-icache-loads

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
1.947e+11 ~ 1% +2.8% 2.002e+11 ~ 1% bay/micro/dd-write/1HDD-cfq-ext4-1dd
1.403e+11 ~ 0% +3.7% 1.454e+11 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
3.35e+11 ~ 0% +3.2% 3.456e+11 ~ 0% TOTAL perf-stat.L1-dcache-stores

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
8.763e+11 ~ 0% +2.3% 8.967e+11 ~ 0% bay/micro/dd-write/1HDD-cfq-ext4-1dd
6.098e+11 ~ 0% +3.4% 6.305e+11 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
1.486e+12 ~ 0% +2.8% 1.527e+12 ~ 0% TOTAL perf-stat.iTLB-loads

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
1.778e+11 ~ 0% +1.7% 1.809e+11 ~ 0% bay/micro/dd-write/1HDD-cfq-ext4-1dd
1.228e+11 ~ 0% +3.9% 1.276e+11 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
3.006e+11 ~ 0% +2.6% 3.084e+11 ~ 0% TOTAL perf-stat.branch-instructions

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
1.117e+12 ~ 0% +2.7% 1.148e+12 ~ 0% bay/micro/dd-write/1HDD-cfq-ext4-1dd
6.754e+11 ~ 0% +2.9% 6.948e+11 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
1.793e+12 ~ 0% +2.8% 1.843e+12 ~ 0% TOTAL perf-stat.cpu-cycles

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
1.949e+11 ~ 1% +2.3% 1.994e+11 ~ 0% bay/micro/dd-write/1HDD-cfq-ext4-1dd
1.403e+11 ~ 0% +3.9% 1.457e+11 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
3.352e+11 ~ 1% +2.9% 3.451e+11 ~ 0% TOTAL perf-stat.dTLB-stores

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
1.765e+11 ~ 1% +2.6% 1.811e+11 ~ 0% bay/micro/dd-write/1HDD-cfq-ext4-1dd
1.229e+11 ~ 0% +3.8% 1.276e+11 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
2.994e+11 ~ 1% +3.1% 3.087e+11 ~ 0% TOTAL perf-stat.branch-loads

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
8.788e+11 ~ 0% +2.3% 8.988e+11 ~ 1% bay/micro/dd-write/1HDD-cfq-ext4-1dd
6.114e+11 ~ 0% +3.8% 6.345e+11 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
1.49e+12 ~ 0% +2.9% 1.533e+12 ~ 0% TOTAL perf-stat.instructions

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
3.279e+11 ~ 0% +2.5% 3.36e+11 ~ 1% bay/micro/dd-write/1HDD-cfq-ext4-1dd
2.201e+11 ~ 0% +3.3% 2.274e+11 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
5.48e+11 ~ 0% +2.8% 5.633e+11 ~ 0% TOTAL perf-stat.dTLB-loads

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
1.256e+11 ~ 1% +2.5% 1.287e+11 ~ 1% bay/micro/dd-write/1HDD-cfq-ext4-1dd
7.72e+10 ~ 0% +3.4% 7.984e+10 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
2.028e+11 ~ 1% +2.9% 2.086e+11 ~ 1% TOTAL perf-stat.bus-cycles

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
3.28e+11 ~ 0% +2.4% 3.36e+11 ~ 0% bay/micro/dd-write/1HDD-cfq-ext4-1dd
2.204e+11 ~ 0% +3.6% 2.284e+11 ~ 0% bay/micro/dd-write/1HDD-cfq-xfs-1dd
5.484e+11 ~ 0% +2.9% 5.644e+11 ~ 0% TOTAL perf-stat.L1-dcache-loads

2cf532f5e67c0cf 8a4aeec8d2d6a3edeffbdfae4
--------------- -------------------------
1.132e+12 ~ 1% +2.4% 1.16e+12 ~ 1% bay/micro/dd-write/1HDD-cfq-ext4-1dd
6.962e+11 ~ 0% +3.0% 7.173e+11 ~ 1% bay/micro/dd-write/1HDD-cfq-xfs-1dd
1.829e+12 ~ 0% +2.7% 1.877e+12 ~ 1% TOTAL perf-stat.ref-cycles