forked from torvalds/linux
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
avoid fragmenting page memory with netdev_alloc_cache
Linux network stack uses an allocation page cache for skbs. The purpose is to reduce the number of page allocations that it needs to make, and it works by allocating a group of pages, and then sub-allocating skb memory from them. When all skbs referencing the shared pages are freed, then the block of pages is finally freed. When these skbs are all freed close together in time, this works fine. However, what can happen is that there are multiple nics (or multiple rx-queues in a single nic), and the skbs are allocated to fill the rx ring(s). If some nics or queues are far more active than others, the entries in the less busy nic/queue may end up referencing a page block, while all of the other packets that referenced that block of pages are freed. The result of this is that the memory used by an appliance for its rx rings can slowly grow to be much greater than it was originally. This patch fixes that by giving each vmxnet3 device a per-rx-queue page cache. Signed-off-by: Todd Sabin <tsabin@vmware.com> Signed-off-by: Ronak Doshi <doshir@vmware.com>
- Loading branch information
1 parent
e4b62cf
commit 9f45ca1995ce8958b4ee24fcdc80639314ce25aa
Showing
4 changed files
with
43 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters