Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140083516
D7538.id19370.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
960 B
Referenced Files
None
Subscribers
None
D7538.id19370.diff
View Options
Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c.new
===================================================================
--- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c.new
+++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c.new
@@ -3447,6 +3447,7 @@
}
static long needfree = 0;
+static int64_t arc_target_size = 0;
typedef enum free_memory_reason_t {
FMR_UNKNOWN,
@@ -3485,6 +3486,10 @@
free_memory_reason_t r = FMR_UNKNOWN;
#ifdef _KERNEL
+ if (needfree) {
+ if(arc_target_size <= arc_size) needfree = 0;
+ else needfree = btoc(arc_target_size - arc_size);
+ }
if (needfree > 0) {
n = PAGESIZE * (-needfree);
if (n < lowest) {
@@ -5360,6 +5365,7 @@
mutex_enter(&arc_reclaim_lock);
/* XXX: Memory deficit should be passed as argument. */
needfree = btoc(arc_c >> arc_shrink_shift);
+ arc_target_size = arc_size - needfree * PAGESIZE;
DTRACE_PROBE(arc__needfree);
cv_signal(&arc_reclaim_thread_cv);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 21, 12:35 AM (4 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27103631
Default Alt Text
D7538.id19370.diff (960 B)
Attached To
Mode
D7538: Correct adaptation ZFS ARC memory pressure to FreeBSD
Attached
Detach File
Event Timeline
Log In to Comment