From: Govindarajulu Varadarajan <_govind@gmx.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, edumazet@google.com, mgorman@suse.de,
Govindarajulu Varadarajan <_govind@gmx.com>
Subject: [PATCH RFC net-next 0/2] Fix pfmemalloc in __netdev_alloc_skb
Date: Sun, 24 Aug 2014 03:07:17 +0530 [thread overview]
Message-ID: <1408829839-20742-1-git-send-email-_govind@gmx.com> (raw)
Hi
After the introduction of skb->pfmemalloc in
c93bdd0e0:(allow skb allocation to use PFMEMALLOC reserves), skb->pfmemalloc
should be set to true if buff is allocated from reserve memory.
But in a1c7fff7e(netdev_alloc_skb() use build_skb()), netdev_alloc_skb() does
not set skb->pfmemalloc if the page is allocated from reserve memory.
Also if the page in netdev_alloc_cache->frag is allocated from reserve memory,
and if the next call to __netdev_alloc_frag does not have __GFP_MEMALLOC in
flags, we should not return a reserved memory. Because the reserve memory could
be sitting in receive queue waiting for packet to arrive. We should release
the reserve memory as soon as possible.
Is my understanding correct?
Govindarajulu Varadarajan (2):
net: skbuff: propagate pfmemalloc to skb
net: skbuff: do not allocate emergency memory if flags is not
__GFP_MEMALLOC
net/core/skbuff.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
--
2.1.0
next reply other threads:[~2014-08-23 21:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-23 21:37 Govindarajulu Varadarajan [this message]
2014-08-23 21:37 ` [PATCH RFC net-next 1/2] net: skbuff: propagate pfmemalloc to skb Govindarajulu Varadarajan
2014-08-23 23:51 ` Eric Dumazet
2014-08-23 21:37 ` [PATCH RFC net-next 2/2] net: skbuff: do not allocate emergency memory if flags is not __GFP_MEMALLOC Govindarajulu Varadarajan
2014-08-23 23:53 ` 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=1408829839-20742-1-git-send-email-_govind@gmx.com \
--to=_govind@gmx.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=mgorman@suse.de \
--cc=netdev@vger.kernel.org \
/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).