aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/page_pool.c
diff options
context:
space:
mode:
authorLiang Chen <[email protected]>2023-12-15 03:30:09 +0000
committerDavid S. Miller <[email protected]>2023-12-17 10:56:33 +0000
commitaaf153aecef1d1831d0d6d371d5c11cf02f0337e (patch)
treea915186aa9c55df5259cbb82435540f75eb9d6e9 /net/core/page_pool.c
parentMerge branch 'tcp-ao-selftests' (diff)
downloadkernel-aaf153aecef1d1831d0d6d371d5c11cf02f0337e.tar.gz
kernel-aaf153aecef1d1831d0d6d371d5c11cf02f0337e.zip
page_pool: halve BIAS_MAX for multiple user references of a fragment
Up to now, we were only subtracting from the number of used page fragments to figure out when a page could be freed or recycled. A following patch introduces support for multiple users referencing the same fragment. So reduce the initial page fragments value to half to avoid overflowing. Signed-off-by: Liang Chen <[email protected]> Reviewed-by: Yunsheng Lin <[email protected]> Reviewed-by: Mina Almasry <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/core/page_pool.c')
-rw-r--r--net/core/page_pool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/page_pool.c b/net/core/page_pool.c
index dd5a72533f2b..4933762e5a6b 100644
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -28,7 +28,7 @@
#define DEFER_TIME (msecs_to_jiffies(1000))
#define DEFER_WARN_INTERVAL (60 * HZ)
-#define BIAS_MAX LONG_MAX
+#define BIAS_MAX (LONG_MAX >> 1)
#ifdef CONFIG_PAGE_POOL_STATS
/* alloc_stat_inc is intended to be used in softirq context */