* [PATCH] net: cleanup gfp mask in alloc_skb_with_frags
@ 2018-06-28 15:53 Michal Hocko
2018-06-30 11:19 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Michal Hocko @ 2018-06-28 15:53 UTC (permalink / raw)
To: davem; +Cc: edumazet, netdev, linux-kernel, Michal Hocko
From: Michal Hocko <mhocko@suse.com>
alloc_skb_with_frags uses __GFP_NORETRY for non-sleeping allocations
which is just a noop and a little bit confusing.
__GFP_NORETRY was added by ed98df3361f0 ("net: use __GFP_NORETRY for
high order allocations") to prevent from the OOM killer. Yet this was
not enough because fb05e7a89f50 ("net: don't wait for order-3 page
allocation") didn't want an excessive reclaim for non-costly orders
so it made it completely NOWAIT while it preserved __GFP_NORETRY in
place which is now redundant.
Drop the pointless __GFP_NORETRY because this function is used as
copy&paste source for other places.
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Michal Hocko <mhocko@suse.com>
---
net/core/skbuff.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index c642304f178c..eba8dae22c25 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -5276,8 +5276,7 @@ struct sk_buff *alloc_skb_with_frags(unsigned long header_len,
if (npages >= 1 << order) {
page = alloc_pages((gfp_mask & ~__GFP_DIRECT_RECLAIM) |
__GFP_COMP |
- __GFP_NOWARN |
- __GFP_NORETRY,
+ __GFP_NOWARN,
order);
if (page)
goto fill_page;
--
2.18.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: cleanup gfp mask in alloc_skb_with_frags
2018-06-28 15:53 [PATCH] net: cleanup gfp mask in alloc_skb_with_frags Michal Hocko
@ 2018-06-30 11:19 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-06-30 11:19 UTC (permalink / raw)
To: mhocko; +Cc: edumazet, netdev, linux-kernel, mhocko
From: Michal Hocko <mhocko@kernel.org>
Date: Thu, 28 Jun 2018 17:53:06 +0200
> From: Michal Hocko <mhocko@suse.com>
>
> alloc_skb_with_frags uses __GFP_NORETRY for non-sleeping allocations
> which is just a noop and a little bit confusing.
>
> __GFP_NORETRY was added by ed98df3361f0 ("net: use __GFP_NORETRY for
> high order allocations") to prevent from the OOM killer. Yet this was
> not enough because fb05e7a89f50 ("net: don't wait for order-3 page
> allocation") didn't want an excessive reclaim for non-costly orders
> so it made it completely NOWAIT while it preserved __GFP_NORETRY in
> place which is now redundant.
>
> Drop the pointless __GFP_NORETRY because this function is used as
> copy&paste source for other places.
>
> Reviewed-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Michal Hocko <mhocko@suse.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-30 11:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-28 15:53 [PATCH] net: cleanup gfp mask in alloc_skb_with_frags Michal Hocko
2018-06-30 11:19 ` David Miller
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).