[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181220222133.1314092-1-jonathan.lemon@gmail.com>
Date: Thu, 20 Dec 2018 14:21:32 -0800
From: Jonathan Lemon <jonathan.lemon@...il.com>
To: <netdev@...r.kernel.org>
Subject: [PATCH 1/2 net-next] net: Don't return pfmemalloc pages to the page pool.
Return pfmemalloc pages back to the page allocator, instead of holding them
in the page pool.
Signed-off-by: Jonathan Lemon <jonathan.lemon@...il.com>
---
net/core/page_pool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/page_pool.c b/net/core/page_pool.c
index 43a932cb609b..364b893be66f 100644
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -233,7 +233,7 @@ void __page_pool_put_page(struct page_pool *pool,
*
* refcnt == 1 means page_pool owns page, and can recycle it.
*/
- if (likely(page_ref_count(page) == 1)) {
+ if (likely(page_ref_count(page) == 1 && !page_is_pfmemalloc(page))) {
/* Read barrier done in page_ref_count / READ_ONCE */
if (allow_direct && in_serving_softirq())
--
2.17.1
Powered by blists - more mailing lists