From: Ronak Doshi <doshir@vmware.com>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: Todd Sabin <tsabin@vmware.com>,
Pv-drivers <Pv-drivers@vmware.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Jonathan Lemon <jonathan.lemon@gmail.com>,
Willem de Bruijn <willemb@google.com>,
Randy Dunlap <rdunlap@infradead.org>,
Kevin Hao <haokexin@gmail.com>,
Aleksandr Nogikh <nogikh@google.com>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Jakub Sitnicki <jakub@cloudflare.com>,
Marco Elver <elver@google.com>, Dexuan Cui <decui@microsoft.com>,
Paolo Abeni <pabeni@redhat.com>,
Miaohe Lin <linmiaohe@huawei.com>,
Guillaume Nault <gnault@redhat.com>,
Dongseok Yi <dseok.yi@samsung.com>,
Yadu Kishore <kyk.segfault@gmail.com>,
open list <linux-kernel@vger.kernel.org>,
Keerthana Kalyanasundaram <keerthanak@vmware.com>
Subject: Re: [PATCH net-next] avoid fragmenting page memory with netdev_alloc_cache
Date: Wed, 24 Feb 2021 19:31:05 +0000 [thread overview]
Message-ID: <0722D5BF-C05C-4D3B-96C7-71D2FBE6991E@vmware.com> (raw)
In-Reply-To: <20210212001842.32714-1-doshir@vmware.com>
On 2/11/21, 4:18 PM, "Ronak Doshi" <doshir@vmware.com> wrote:
> From: Todd Sabin <tsabin@vmware.com>
>
> 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>
> ---
> drivers/net/vmxnet3/vmxnet3_drv.c | 30 ++++++++++++++++++++++++------
> drivers/net/vmxnet3/vmxnet3_int.h | 2 ++
> include/linux/skbuff.h | 2 ++
> net/core/skbuff.c | 21 +++++++++++++++------
> 4 files changed, 43 insertions(+), 12 deletions(-)
Any update on this patch?
Thanks,
Ronak
prev parent reply other threads:[~2021-02-24 19:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-12 0:18 Ronak Doshi
2021-02-24 19:31 ` Ronak Doshi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0722D5BF-C05C-4D3B-96C7-71D2FBE6991E@vmware.com \
--to=doshir@vmware.com \
--cc=Pv-drivers@vmware.com \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=dseok.yi@samsung.com \
--cc=elver@google.com \
--cc=gnault@redhat.com \
--cc=haokexin@gmail.com \
--cc=jakub@cloudflare.com \
--cc=jonathan.lemon@gmail.com \
--cc=keerthanak@vmware.com \
--cc=kuba@kernel.org \
--cc=kyk.segfault@gmail.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nogikh@google.com \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=rdunlap@infradead.org \
--cc=tsabin@vmware.com \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®