Commit 948392a
committed
common: Leverage a better CRC32C implementation
ISA-L provides a few different CRC32C implementations, of
which Ceph has only ever linked against one
(crc32_iscsi_00).
The second implementation of CRC32C provided by ISA-L
(crc32_iscsi_01) improves upon the first as it is used by
Ceph in a couple of ways:
1) crc32_iscsi_01 explicitly handles and checks for < 8
byte buffers and computes the CRC32C value using the
hardware-accelerated CRC32 instruction. In comparison,
crc32_iscsi_00 prefetches too far in cases of small
buffers, requiring the Ceph code to explicitly check
and handle this case differently in software. This
software-fallback implementation of CRC32 also comes
with a different set of LUTs (look up tables) and is
less efficient as it does not make use of the CRC32
instruction.
2) crc32_iscsi_00 makes use of large LUTs (look up
tables) to effectively perform the modular reduction
required to produce the CRC32C value. In constrast,
crc32_iscsi_01 uses the PCLMUL instruction set to
perform reductions 128-bits at a time with smaller
LUTs, resulting in greater throughput and less data
cache pollution.
Fixes: https://tracker.ceph.com/issues/65791
Signed-off-by: Tyler Stachecki <[email protected]>1 parent 7dd8e5a commit 948392a
File tree
4 files changed
+30
-0
lines changed- src/common
4 files changed
+30
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
218 | 219 | | |
219 | 220 | | |
220 | 221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
9 | 24 | | |
10 | 25 | | |
11 | 26 | | |
| |||
43 | 58 | | |
44 | 59 | | |
45 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
46 | 66 | | |
47 | 67 | | |
48 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
17 | 23 | | |
18 | 24 | | |
19 | 25 | | |
| |||
0 commit comments