diff options
author | Zhen Lei <[email protected]> | 2017-09-21 16:52:43 +0100 |
---|---|---|
committer | Joerg Roedel <[email protected]> | 2017-09-27 17:09:56 +0200 |
commit | 086c83acb70fc6da044c9ca45c1c9780c64545b0 (patch) | |
tree | 0f3e852600d7c60bad9b8bd0e8fbd1a710293de8 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 2070f940a6d5148cf2df0d0087ff0a64d9f15237 (diff) |
iommu/iova: Optimise the padding calculation
The mask for calculating the padding size doesn't change, so there's no
need to recalculate it every loop iteration. Furthermore, Once we've
done that, it becomes clear that we don't actually need to calculate a
padding size at all - by flipping the arithmetic around, we can just
combine the upper limit, size, and mask directly to check against the
lower limit.
For an arm64 build, this alone knocks 20% off the object code size of
the entire alloc_iova() function!
Signed-off-by: Zhen Lei <[email protected]>
Tested-by: Ard Biesheuvel <[email protected]>
Tested-by: Zhen Lei <[email protected]>
Tested-by: Nate Watterson <[email protected]>
[rm: simplified more of the arithmetic, rewrote commit message]
Signed-off-by: Robin Murphy <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions