summaryrefslogtreecommitdiff
path: root/block/blk-iocost.c
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2019-11-18 19:03:36 +0100
committerAlexei Starovoitov <ast@kernel.org>2019-11-18 19:51:16 -0800
commite0491f64795bfc71ef6b13ba6b6fa6e176fa3c23 (patch)
treed11bc8278ce9007aee5b00fd6d6985e359aa72f8 /block/blk-iocost.c
parent4e9b4a6883dd97aff53ae3b08eb900716a5469dc (diff)
s390/bpf: Align literal pool entries
When literal pool size exceeds 512k, it's no longer possible to reference all the entries in it using a single base register and long displacement. Therefore, PC-relative lgfrl and lgrl instructions need to be used. Unfortunately, they require their arguments to be aligned to 4- and 8-byte boundaries respectively. This generates certain overhead due to necessary padding bytes. Grouping 4- and 8-byte entries together reduces the maximum overhead to 6 bytes (2 for aligning 4-byte entries and 4 for aligning 8-byte entries). While in theory it is possible to detect whether or not alignment is needed by comparing the literal pool size with 512k, in practice this leads to having two ways of emitting constants, making the code more complicated. Prefer code simplicity over trivial size saving, and always group and align literal pool entries. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20191118180340.68373-3-iii@linux.ibm.com
Diffstat (limited to 'block/blk-iocost.c')
0 files changed, 0 insertions, 0 deletions