netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] page_pool: mark unbound node page as reusable pages
@ 2019-12-04 10:14 Li RongQing
  2019-12-05  0:55 ` Yunsheng Lin
  0 siblings, 1 reply; 14+ messages in thread
From: Li RongQing @ 2019-12-04 10:14 UTC (permalink / raw)
  To: netdev, saeedm

some drivers uses page pool, but not require to allocate
page from bound node, so pool.p.nid is NUMA_NO_NODE, and
this fixed patch will block this kind of driver to
recycle

Fixes: d5394610b1ba ("page_pool: Don't recycle non-reusable pages")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Cc: Saeed Mahameed <saeedm@mellanox.com>
---
 net/core/page_pool.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/core/page_pool.c b/net/core/page_pool.c
index a6aefe989043..4054db683178 100644
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -317,7 +317,9 @@ static bool __page_pool_recycle_direct(struct page *page,
  */
 static bool pool_page_reusable(struct page_pool *pool, struct page *page)
 {
-	return !page_is_pfmemalloc(page) && page_to_nid(page) == pool->p.nid;
+	return !page_is_pfmemalloc(page) &&
+		(page_to_nid(page) == pool->p.nid ||
+		 pool->p.nid == NUMA_NO_NODE);
 }
 
 void __page_pool_put_page(struct page_pool *pool, struct page *page,
-- 
2.16.2


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

end of thread, other threads:[~2019-12-06  8:05 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-04 10:14 [PATCH] page_pool: mark unbound node page as reusable pages Li RongQing
2019-12-05  0:55 ` Yunsheng Lin
2019-12-05  1:08   ` 答复: " Li,Rongqing
2019-12-05  1:43     ` Yunsheng Lin
2019-12-05  1:55       ` 答复: " Li,Rongqing
2019-12-05  2:06         ` Yunsheng Lin
2019-12-05  2:17           ` 答复: " Li,Rongqing
2019-12-05  2:30             ` Yunsheng Lin
2019-12-05  2:47               ` 答复: " Li,Rongqing
2019-12-05  3:03                 ` Yunsheng Lin
2019-12-05  3:18                   ` 答复: " Li,Rongqing
2019-12-05  3:33                     ` Yunsheng Lin
2019-12-06  8:05                       ` 答复: " Li,Rongqing
2019-12-05  1:22   ` Li,Rongqing

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).