diff options
author | Anton Blanchard <anton@samba.org> | 2014-10-02 15:44:21 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2014-10-02 16:04:21 +1000 |
commit | e35735b9a5d8d38d9ffe2f1f0cdcbb0d45c42eff (patch) | |
tree | 643f44507bdd55a621f7b772d877054fa7869f6e /drivers/watchdog/of_xilinx_wdt.c | |
parent | 2013add4ce73c93ae2148969a9ec3ecc8b1e26fa (diff) |
powerpc: Speed up clear_page by unrolling it
Unroll clear_page 8 times. A simple microbenchmark which
allocates and frees a zeroed page:
for (i = 0; i < iterations; i++) {
unsigned long p = __get_free_page(GFP_KERNEL | __GFP_ZERO);
free_page(p);
}
improves 20% on POWER8.
This assumes cacheline sizes won't grow beyond 512 bytes or
page sizes wont drop below 1kB, which is unlikely, but we could
add a runtime check during early init if it makes people nervous.
Michael found that some versions of gcc produce quite bad code
(all multiplies), so we give gcc a hand by using shifts and adds.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/watchdog/of_xilinx_wdt.c')
0 files changed, 0 insertions, 0 deletions