Commit 74d332c
net: extend net_device allocation to vmalloc()
Joby Poriyath provided a xen-netback patch to reduce the size of
xenvif structure as some netdev allocation could fail under
memory pressure/fragmentation.
This patch is handling the problem at the core level, allowing
any netdev structures to use vmalloc() if kmalloc() failed.
As vmalloc() adds overhead on a critical network path, add __GFP_REPEAT
to kzalloc() flags to do this fallback only when really needed.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Joby Poriyath <joby.poriyath@citrix.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent b397f99 commit 74d332c
File tree
4 files changed
+24
-11
lines changed- Documentation/networking
- include/linux
- net/core
4 files changed
+24
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | | - | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1800 | 1800 | | |
1801 | 1801 | | |
1802 | 1802 | | |
| 1803 | + | |
1803 | 1804 | | |
1804 | 1805 | | |
1805 | 1806 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6196 | 6196 | | |
6197 | 6197 | | |
6198 | 6198 | | |
| 6199 | + | |
| 6200 | + | |
| 6201 | + | |
| 6202 | + | |
| 6203 | + | |
| 6204 | + | |
| 6205 | + | |
| 6206 | + | |
| 6207 | + | |
| 6208 | + | |
6199 | 6209 | | |
6200 | 6210 | | |
6201 | 6211 | | |
| |||
6239 | 6249 | | |
6240 | 6250 | | |
6241 | 6251 | | |
6242 | | - | |
| 6252 | + | |
| 6253 | + | |
| 6254 | + | |
6243 | 6255 | | |
6244 | 6256 | | |
6245 | 6257 | | |
| |||
6248 | 6260 | | |
6249 | 6261 | | |
6250 | 6262 | | |
6251 | | - | |
| 6263 | + | |
6252 | 6264 | | |
6253 | 6265 | | |
6254 | 6266 | | |
| |||
6301 | 6313 | | |
6302 | 6314 | | |
6303 | 6315 | | |
6304 | | - | |
6305 | | - | |
| 6316 | + | |
| 6317 | + | |
6306 | 6318 | | |
6307 | 6319 | | |
6308 | 6320 | | |
| |||
6339 | 6351 | | |
6340 | 6352 | | |
6341 | 6353 | | |
6342 | | - | |
| 6354 | + | |
6343 | 6355 | | |
6344 | 6356 | | |
6345 | 6357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1263 | 1263 | | |
1264 | 1264 | | |
1265 | 1265 | | |
1266 | | - | |
| 1266 | + | |
1267 | 1267 | | |
1268 | 1268 | | |
1269 | 1269 | | |
| |||
0 commit comments