Netdev List
 help / color / mirror / Atom feed
* [PATCH] net: fix the per task frag allocator size
@ 2018-11-23  2:03 Li RongQing
  2018-11-23  2:19 ` Yunsheng Lin
  0 siblings, 1 reply; 3+ messages in thread
From: Li RongQing @ 2018-11-23  2:03 UTC (permalink / raw)
  To: netdev, edumazet

when fill task frag, 32K pages, 128MB memory is asked, it
hardly successes when system has memory stress

and commit '5640f7685831 ("net: use a per task frag allocator")'
said it wants 32768 bytes, not 32768 pages:

	 "(up to 32768 bytes per frag, thats order-3 pages on x86)"

Fixes: 5640f7685831e ("net: use a per task frag allocator")
Signed-off-by: Zhang Yu <zhangyu31@baidu.com>
Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 net/core/sock.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/core/sock.c b/net/core/sock.c
index 6d7e189e3cd9..e3cbefeedf5c 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2186,8 +2186,8 @@ static void sk_leave_memory_pressure(struct sock *sk)
 	}
 }
 
-/* On 32bit arches, an skb frag is limited to 2^15 */
-#define SKB_FRAG_PAGE_ORDER	get_order(32768)
+/* On 32bit arches, an skb frag is limited to 2^15 bytes*/
+#define SKB_FRAG_PAGE_ORDER	get_order(8)
 
 /**
  * skb_page_frag_refill - check that a page_frag contains enough room
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-23 13:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-23  2:03 [PATCH] net: fix the per task frag allocator size Li RongQing
2018-11-23  2:19 ` Yunsheng Lin
2018-11-23  2:40   ` 答复: " Li,Rongqing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox