From: Andrew Lunn <andrew@lunn.ch>
To: Zhu Yanjun <yanjun.zhu@oracle.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCHv2 0/2] forcedeth: recv cache to make NIC work steadily
Date: Sun, 21 Jul 2019 16:53:24 +0200 [thread overview]
Message-ID: <20190721145324.GD22996@lunn.ch> (raw)
In-Reply-To: <1563713633-25528-1-git-send-email-yanjun.zhu@oracle.com>
On Sun, Jul 21, 2019 at 08:53:51AM -0400, Zhu Yanjun wrote:
> These patches are to this scenario:
>
> "
> When the host run for long time, there are a lot of memory fragments in
> the hosts. And it is possible that kernel will compact memory fragments.
> But normally it is difficult for NIC driver to allocate a memory from
> kernel. From this variable stat_rx_dropped, we can confirm that NIC driver
> can not allocate skb very frequently.
> "
>
> Since NIC driver can not allocate skb in time, this makes some important
> tasks not be completed in time.
> To avoid it, a recv cache is created to pre-allocate skb for NIC driver.
> This can make the important tasks be completed in time.
> >From Nan's tests in LAB, these patches can make NIC driver work steadily.
> Now in production hosts, these patches are applied.
>
> With these patches, one NIC port needs 125MiB reserved. This 125MiB memory
> can not be used by others. To a host on which the communications are not
> mandatory, it is not necessary to reserve so much memory. So this recv cache
> is disabled by default.
>
> V1->V2:
> 1. ndelay is replaced with GFP_KERNEL function __netdev_alloc_skb.
> 2. skb_queue_purge is used when recv cache is destroyed.
> 3. RECV_LIST_ALLOCATE bit is removed.
> 4. schedule_delayed_work is moved out of while loop.
Hi Zhu
You don't appear to of address David's comment that this is probably
the wrong way to do this, it should be a generic solution.
Also, that there should be enough atomic memory in the system
anyway. Have you looked at what other drivers are using atomic memory?
It could actually be you need to debug some other driver, rather than
add hacks to forcedeth.
Andrew
next prev parent reply other threads:[~2019-07-21 14:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-21 12:53 [PATCHv2 0/2] forcedeth: recv cache to make NIC work steadily Zhu Yanjun
2019-07-21 12:53 ` [PATCHv2 1/2] forcedeth: add recv cache to make nic " Zhu Yanjun
2019-07-21 12:53 ` [PATCHv2 2/2] forcedeth: disable recv cache by default Zhu Yanjun
2019-07-21 14:48 ` Andrew Lunn
2019-07-21 14:53 ` Andrew Lunn [this message]
2019-07-21 18:45 ` [PATCHv2 0/2] forcedeth: recv cache to make NIC work steadily David Miller
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=20190721145324.GD22996@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=yanjun.zhu@oracle.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;
as well as URLs for NNTP newsgroup(s).