Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157254774
D44170.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
896 B
Referenced Files
None
Subscribers
None
D44170.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
Wed, May 20, 6:21 PM (2 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33353435
Default Alt Text
D44170.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
Log In to Comment