OSDN Git Service

clocksource/drivers/dw_apb_timer: Use {readl|writel}_relaxed in critical path
authorJisheng Zhang <jszhang@marvell.com>
Wed, 25 Nov 2015 16:01:53 +0000 (00:01 +0800)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 15 Dec 2015 20:41:28 +0000 (21:41 +0100)
commit39d3611f2d8ff5dcba523c9081e6f5e51f066c86
tree5c4d95695e85298df18776abb05774cc021a08a1
parent9f4165dc4e9e6dd10627b7b4d4e09c09fc01410c
clocksource/drivers/dw_apb_timer: Use {readl|writel}_relaxed in critical path

It's safe to use the relaxed version. From another side, the relaxed io
accessor macros are available on all architectures now, so we can use
the relaxed versions to get a trivial system performance improvement,
we measured time the following functions spent on Marvell BG4CT:

4096 rounds of __apbt_read_clocksource() call:

before the patch: 1263240ns on average
after the patch: 1250080ns on average
improved by 1%

4096 rounds of apbt_eoi() call:

before the patch: 1290960ns on average
after the patch: 1248240ns on average

4096 rounds of apbt_next_event() call:

before the patch: 3333660ns on average
after the patch: 1322040ns on average

improved by 60%!

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/dw_apb_timer.c