Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F176895861
D44170.1793587654.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
896 B
Referenced Files
None
Subscribers
None
D44170.1793587654.diff
View Options
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/arc_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/arc_os.c
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/arc_os.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/arc_os.c
@@ -151,6 +151,9 @@
return (MAX(allmem * 5 / 8, size));
}
+/* The flag indicating a running ARC pruning task. */
+static int arc_prune_running;
+
/*
* Helper function for arc_prune_async() it is responsible for safely
* handling the execution of a registered arc_prune_func_t.
@@ -172,6 +175,7 @@
#else
vnlru_free(nr_scan, &zfs_vfsops);
#endif
+ atomic_store_rel_int(&arc_prune_running, 0);
}
/*
@@ -188,6 +192,12 @@
void
arc_prune_async(int64_t adjust)
{
+ int ret;
+
+ /* Avoid piling up the ARC pruning tasks. */
+ ret = atomic_cmpset_acq_int(&arc_prune_running, 0, 1);
+ if (!ret)
+ return;
#ifndef __LP64__
if (adjust > INTPTR_MAX)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 2, 2:47 AM (13 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41302128
Default Alt Text
D44170.1793587654.diff (896 B)
Attached To
Mode
D44170: kern/openzfs: Apply the essential part of FreeBSD-EN-23:18.openzfs. (stable/13)
Attached
Detach File
Event Timeline