lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1575454465-15386-1-git-send-email-lirongqing@baidu.com>
Date:   Wed,  4 Dec 2019 18:14:25 +0800
From:   Li RongQing <lirongqing@...du.com>
To:     netdev@...r.kernel.org, saeedm@...lanox.com
Subject: [PATCH] page_pool: mark unbound node page as reusable pages

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@...du.com>
Cc: Saeed Mahameed <saeedm@...lanox.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ