Repository navigation
Commit be2ff42
fuse: Use hash table to link processing request
We noticed the performance bottleneck in FUSE running our Virtuozzo storage
over rdma. On some types of workload we observe 20% of times spent in
request_find() in profiler. This function is iterating over long requests
list, and it scales bad.
The patch introduces hash table to reduce the number of iterations, we do
in this function. Hash generating algorithm is taken from hash_add()
function, while 256 lines table is used to store pending requests. This
fixes problem and improves the performance.
Reported-by: Alexey Kuznetsov <kuznet@virtuozzo.com>
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>1 parent 3a5358d commit be2ff42
3 files changed
Lines changed: 41 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
330 | 335 | | |
331 | 336 | | |
332 | 337 | | |
| |||
1248 | 1253 | | |
1249 | 1254 | | |
1250 | 1255 | | |
| 1256 | + | |
1251 | 1257 | | |
1252 | 1258 | | |
1253 | 1259 | | |
| |||
1320 | 1326 | | |
1321 | 1327 | | |
1322 | 1328 | | |
1323 | | - | |
| 1329 | + | |
| 1330 | + | |
1324 | 1331 | | |
1325 | 1332 | | |
1326 | 1333 | | |
| |||
1804 | 1811 | | |
1805 | 1812 | | |
1806 | 1813 | | |
| 1814 | + | |
1807 | 1815 | | |
1808 | 1816 | | |
1809 | | - | |
| 1817 | + | |
1810 | 1818 | | |
1811 | 1819 | | |
1812 | 1820 | | |
| |||
2118 | 2126 | | |
2119 | 2127 | | |
2120 | 2128 | | |
| 2129 | + | |
2121 | 2130 | | |
2122 | 2131 | | |
2123 | 2132 | | |
| |||
2142 | 2151 | | |
2143 | 2152 | | |
2144 | 2153 | | |
2145 | | - | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
2146 | 2157 | | |
2147 | 2158 | | |
2148 | 2159 | | |
| |||
2185 | 2196 | | |
2186 | 2197 | | |
2187 | 2198 | | |
| 2199 | + | |
2188 | 2200 | | |
2189 | 2201 | | |
2190 | 2202 | | |
2191 | | - | |
| 2203 | + | |
| 2204 | + | |
2192 | 2205 | | |
2193 | 2206 | | |
2194 | 2207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
411 | 414 | | |
412 | 415 | | |
413 | 416 | | |
414 | 417 | | |
415 | 418 | | |
416 | 419 | | |
417 | 420 | | |
418 | | - | |
419 | | - | |
| 421 | + | |
| 422 | + | |
420 | 423 | | |
421 | 424 | | |
422 | 425 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
597 | | - | |
| 597 | + | |
| 598 | + | |
598 | 599 | | |
599 | | - | |
| 600 | + | |
| 601 | + | |
600 | 602 | | |
601 | 603 | | |
602 | 604 | | |
| |||
1025 | 1027 | | |
1026 | 1028 | | |
1027 | 1029 | | |
| 1030 | + | |
1028 | 1031 | | |
1029 | 1032 | | |
1030 | | - | |
1031 | | - | |
1032 | | - | |
| 1033 | + | |
| 1034 | + | |
1033 | 1035 | | |
1034 | | - | |
1035 | | - | |
1036 | | - | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
1037 | 1040 | | |
1038 | 1041 | | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
1039 | 1050 | | |
1040 | 1051 | | |
1041 | 1052 | | |
| |||
0 commit comments