From: Eric Dumazet <eric.dumazet@gmail.com>
To: Andrey Ryabinin <aryabinin@virtuozzo.com>,
"David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>,
Mel Gorman <mgorman@techsingularity.net>,
Willem de Bruijn <willemb@google.com>,
Florian Westphal <fw@strlen.de>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 1/4] net/skbuff: don't waste memory reserves
Date: Fri, 19 Apr 2019 06:41:37 -0700 [thread overview]
Message-ID: <a80606cf-3076-b01d-0442-ccff3c462276@gmail.com> (raw)
In-Reply-To: <c2c270d9-29c0-b993-84c5-4c994608f7c8@virtuozzo.com>
On 04/19/2019 06:17 AM, Andrey Ryabinin wrote:
>
> I don't see why that would be a problem. If refill failed because we didn't have
> access to reserves, then there going to be an another refill attempt, right?
> And the next refill attempt will be with access to the reserves if memalloc socket was created.
> We can't predict the future, so until the memalloc socket appeared we must assume that those
> RX ring buffers won't be used to reclaim memory (and that is actually true in 99% of cases).
>
I just said that the alloc might be attempted "in the past"
Yes, we can not predict the future, this is why we need to access the reserve _now_ and not
at the time the packet is received.
The 'being true in 99% of cases' argument is not really convincing.
You want the NIC to be ready to receive packets even before sk_memalloc_socks() becomes true.
If a NIC driver has a bug, please fix it.
next prev parent reply other threads:[~2019-04-19 18:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-18 18:05 [PATCH 1/4] net/skbuff: don't waste memory reserves Andrey Ryabinin
2019-04-18 18:05 ` [PATCH 2/4] net/skbuff: warn if kmalloc_reserve() fails to allocate memory Andrey Ryabinin
2019-04-18 18:05 ` [PATCH 3/4] net/skbuff: remove unused skb_propagate_pfmemalloc() Andrey Ryabinin
2019-04-18 18:05 ` [PATCH 4/4] net/skbuff: kmalloc_reserve(): remove unused argument Andrey Ryabinin
2019-04-18 18:55 ` [PATCH 1/4] net/skbuff: don't waste memory reserves Eric Dumazet
2019-04-18 18:56 ` David Miller
2019-04-19 13:17 ` Andrey Ryabinin
2019-04-19 13:36 ` Eric Dumazet
2019-04-19 13:41 ` Eric Dumazet [this message]
2019-04-19 16:25 ` Andrey Ryabinin
2019-04-19 16:27 ` Eric Dumazet
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=a80606cf-3076-b01d-0442-ccff3c462276@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=aryabinin@virtuozzo.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@techsingularity.net \
--cc=netdev@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).