Commit 011b033
Revert "net: skb: introduce and use a single page frag cache"
This reverts commit dbae2b0 ("net: skb: introduce and use a single
page frag cache"). The intended goal of such change was to counter a
performance regression introduced by commit 3226b15 ("net: avoid
32 x truesize under-estimation for tiny skbs").
Unfortunately, the blamed commit introduces another regression for the
virtio_net driver. Such a driver calls napi_alloc_skb() with a tiny
size, so that the whole head frag could fit a 512-byte block.
The single page frag cache uses a 1K fragment for such allocation, and
the additional overhead, under small UDP packets flood, makes the page
allocator a bottleneck.
Thanks to commit bf9f1ba ("net: add dedicated kmem_cache for
typical/small skb->head"), this revert does not re-introduce the
original regression. Actually, in the relevant test on top of this
revert, I measure a small but noticeable positive delta, just above
noise level.
The revert itself required some additional mangling due to the
introduction of the SKB_HEAD_ALIGN() helper and local lock infra in the
affected code.
Suggested-by: Eric Dumazet <[email protected]>
Fixes: dbae2b0 ("net: skb: introduce and use a single page frag cache")
Signed-off-by: Paolo Abeni <[email protected]>
Link: https://patch.msgid.link/e649212fde9f0fdee23909ca0d14158d32bb7425.1738877290.git.pabeni@redhat.com
Signed-off-by: Jakub Kicinski <[email protected]>1 parent cb827db commit 011b033
3 files changed
+22
-99
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4115 | 4115 | | |
4116 | 4116 | | |
4117 | 4117 | | |
4118 | | - | |
4119 | 4118 | | |
4120 | 4119 | | |
4121 | 4120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6920 | 6920 | | |
6921 | 6921 | | |
6922 | 6922 | | |
| 6923 | + | |
| 6924 | + | |
| 6925 | + | |
| 6926 | + | |
| 6927 | + | |
| 6928 | + | |
| 6929 | + | |
| 6930 | + | |
| 6931 | + | |
| 6932 | + | |
| 6933 | + | |
| 6934 | + | |
| 6935 | + | |
| 6936 | + | |
| 6937 | + | |
| 6938 | + | |
| 6939 | + | |
6923 | 6940 | | |
6924 | 6941 | | |
6925 | 6942 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | 223 | | |
281 | 224 | | |
282 | 225 | | |
283 | | - | |
284 | 226 | | |
285 | 227 | | |
286 | 228 | | |
| |||
290 | 232 | | |
291 | 233 | | |
292 | 234 | | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | 235 | | |
311 | 236 | | |
312 | 237 | | |
| |||
813 | 738 | | |
814 | 739 | | |
815 | 740 | | |
816 | | - | |
817 | | - | |
818 | 741 | | |
819 | | - | |
| 742 | + | |
820 | 743 | | |
821 | 744 | | |
822 | 745 | | |
| |||
826 | 749 | | |
827 | 750 | | |
828 | 751 | | |
| 752 | + | |
| 753 | + | |
829 | 754 | | |
830 | 755 | | |
831 | 756 | | |
832 | 757 | | |
833 | 758 | | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | 759 | | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
854 | | - | |
| 760 | + | |
| 761 | + | |
855 | 762 | | |
856 | 763 | | |
857 | 764 | | |
| |||
0 commit comments