summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorJisheng Zhang <Jisheng.Zhang@synaptics.com>2018-08-31 11:11:09 +0300
committerDavid S. Miller <davem@davemloft.net>2018-09-03 00:13:31 +0300
commitbd9f1ee364094c66e387199809e28518b0e73954 (patch)
tree5f37b563e1fb4d69e8b946914ccf149886893d8b /tools/perf/scripts/python/export-to-sqlite.py
parent7772988ad62332477bc2f427953fa122e24026b0 (diff)
downloadlinux-bd9f1ee364094c66e387199809e28518b0e73954.tar.xz
net: mvneta: reduce smp_processor_id() calling in mvneta_tx_done_gbe
In the loop of mvneta_tx_done_gbe(), we call the smp_processor_id() each time, move the call out of the loop to optimize the code a bit. Before the patch, the loop looks like(under arm64): ldr x1, [x29,#120] ... ldr w24, [x1,#36] ... bl 0 <_raw_spin_lock> str w24, [x27,#132] ... After the patch, the loop looks like(under arm64): ... bl 0 <_raw_spin_lock> str w23, [x28,#132] ... where w23 is loaded so be ready before the loop. >From another side, mvneta_tx_done_gbe() is called from mvneta_poll() which is in non-preemptible context, so it's safe to call the smp_processor_id() function once. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions