]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/core/sock.c
mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and...
[karo-tx-linux.git] / net / core / sock.c
index 3307c02244d39cfa3fbae969ea478fa0f195e595..8cab9d90b0185cfe216d75ecf932b75b31b0a222 100644 (file)
@@ -1879,8 +1879,10 @@ bool skb_page_frag_refill(unsigned int sz, struct page_frag *pfrag, gfp_t gfp)
 
        pfrag->offset = 0;
        if (SKB_FRAG_PAGE_ORDER) {
-               pfrag->page = alloc_pages((gfp & ~__GFP_WAIT) | __GFP_COMP |
-                                         __GFP_NOWARN | __GFP_NORETRY,
+               /* Avoid direct reclaim but allow kswapd to wake */
+               pfrag->page = alloc_pages((gfp & ~__GFP_DIRECT_RECLAIM) |
+                                         __GFP_COMP | __GFP_NOWARN |
+                                         __GFP_NORETRY,
                                          SKB_FRAG_PAGE_ORDER);
                if (likely(pfrag->page)) {
                        pfrag->size = PAGE_SIZE << SKB_FRAG_PAGE_ORDER;