Commit 40b215e
tcp: de-bloat a bit with factoring NET_INC_STATS_BH out
There are some places in TCP that select one MIB index to
bump snmp statistics like this:
if (<something>)
NET_INC_STATS_BH(<some_id>);
else if (<something_else>)
NET_INC_STATS_BH(<some_other_id>);
...
else
NET_INC_STATS_BH(<default_id>);
or in a more tricky but still similar way.
On the other hand, this NET_INC_STATS_BH is a camouflaged
increment of percpu variable, which is not that small.
Factoring those cases out de-bloats 235 bytes on non-preemptible
i386 config and drives parts of the code into 80 columns.
add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-235 (-235)
function old new delta
tcp_fastretrans_alert 1437 1424 -13
tcp_dsack_set 137 124 -13
tcp_xmit_retransmit_queue 690 676 -14
tcp_try_undo_recovery 283 265 -18
tcp_sacktag_write_queue 1550 1515 -35
tcp_update_reordering 162 106 -56
tcp_retransmit_timer 990 904 -86
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent b4653e9 commit 40b215e
3 files changed
+46
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
947 | 947 | | |
948 | 948 | | |
949 | 949 | | |
| 950 | + | |
| 951 | + | |
950 | 952 | | |
951 | 953 | | |
952 | 954 | | |
953 | 955 | | |
954 | | - | |
| 956 | + | |
955 | 957 | | |
956 | | - | |
| 958 | + | |
957 | 959 | | |
958 | | - | |
| 960 | + | |
959 | 961 | | |
960 | | - | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
961 | 965 | | |
962 | 966 | | |
963 | 967 | | |
| |||
1456 | 1460 | | |
1457 | 1461 | | |
1458 | 1462 | | |
| 1463 | + | |
| 1464 | + | |
1459 | 1465 | | |
1460 | 1466 | | |
1461 | | - | |
| 1467 | + | |
1462 | 1468 | | |
1463 | | - | |
| 1469 | + | |
1464 | 1470 | | |
1465 | 1471 | | |
1466 | 1472 | | |
1467 | 1473 | | |
1468 | 1474 | | |
1469 | | - | |
| 1475 | + | |
1470 | 1476 | | |
| 1477 | + | |
| 1478 | + | |
1471 | 1479 | | |
1472 | 1480 | | |
1473 | 1481 | | |
| |||
2380 | 2388 | | |
2381 | 2389 | | |
2382 | 2390 | | |
| 2391 | + | |
| 2392 | + | |
2383 | 2393 | | |
2384 | 2394 | | |
2385 | 2395 | | |
2386 | 2396 | | |
2387 | 2397 | | |
2388 | 2398 | | |
2389 | | - | |
| 2399 | + | |
2390 | 2400 | | |
2391 | | - | |
| 2401 | + | |
| 2402 | + | |
| 2403 | + | |
2392 | 2404 | | |
2393 | 2405 | | |
2394 | 2406 | | |
| |||
2560 | 2572 | | |
2561 | 2573 | | |
2562 | 2574 | | |
2563 | | - | |
| 2575 | + | |
2564 | 2576 | | |
2565 | 2577 | | |
2566 | 2578 | | |
| |||
2683 | 2695 | | |
2684 | 2696 | | |
2685 | 2697 | | |
2686 | | - | |
| 2698 | + | |
2687 | 2699 | | |
2688 | | - | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
2689 | 2703 | | |
2690 | 2704 | | |
2691 | 2705 | | |
| |||
3700 | 3714 | | |
3701 | 3715 | | |
3702 | 3716 | | |
| 3717 | + | |
| 3718 | + | |
3703 | 3719 | | |
3704 | | - | |
| 3720 | + | |
3705 | 3721 | | |
3706 | | - | |
| 3722 | + | |
| 3723 | + | |
| 3724 | + | |
3707 | 3725 | | |
3708 | 3726 | | |
3709 | 3727 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1985 | 1985 | | |
1986 | 1986 | | |
1987 | 1987 | | |
| 1988 | + | |
| 1989 | + | |
1988 | 1990 | | |
1989 | 1991 | | |
1990 | 1992 | | |
1991 | 1993 | | |
1992 | 1994 | | |
1993 | | - | |
| 1995 | + | |
1994 | 1996 | | |
1995 | | - | |
| 1997 | + | |
| 1998 | + | |
1996 | 1999 | | |
1997 | 2000 | | |
1998 | 2001 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| 329 | + | |
| 330 | + | |
329 | 331 | | |
330 | 332 | | |
331 | 333 | | |
332 | 334 | | |
333 | | - | |
| 335 | + | |
334 | 336 | | |
335 | | - | |
| 337 | + | |
336 | 338 | | |
337 | 339 | | |
338 | | - | |
| 340 | + | |
339 | 341 | | |
340 | | - | |
| 342 | + | |
341 | 343 | | |
342 | 344 | | |
343 | | - | |
| 345 | + | |
344 | 346 | | |
345 | | - | |
| 347 | + | |
346 | 348 | | |
| 349 | + | |
347 | 350 | | |
348 | 351 | | |
349 | 352 | | |
| |||
0 commit comments