Commit 3cd3399
net: implement per-cpu reserves for memory_allocated
We plan keeping sk->sk_forward_alloc as small as possible
in future patches.
This means we are going to call sk_memory_allocated_add()
and sk_memory_allocated_sub() more often.
Implement a per-cpu cache of +1/-1 MB, to reduce number
of changes to sk->sk_prot->memory_allocated, which
would otherwise be cause of false sharing.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 0defbb0 commit 3cd3399
1 file changed
+29
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1397 | 1397 | | |
1398 | 1398 | | |
1399 | 1399 | | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
1400 | 1406 | | |
1401 | 1407 | | |
1402 | 1408 | | |
1403 | | - | |
| 1409 | + | |
1404 | 1410 | | |
1405 | 1411 | | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
1406 | 1415 | | |
1407 | 1416 | | |
1408 | 1417 | | |
1409 | | - | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
1410 | 1428 | | |
1411 | 1429 | | |
1412 | 1430 | | |
1413 | 1431 | | |
1414 | 1432 | | |
1415 | | - | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
1416 | 1442 | | |
1417 | 1443 | | |
1418 | 1444 | | |
| |||
1441 | 1467 | | |
1442 | 1468 | | |
1443 | 1469 | | |
1444 | | - | |
1445 | | - | |
1446 | | - | |
1447 | | - | |
1448 | | - | |
1449 | | - | |
1450 | 1470 | | |
1451 | 1471 | | |
1452 | 1472 | | |
| |||
0 commit comments