Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137651381
D12163.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D12163.diff
View Options
Index: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
===================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
@@ -4199,8 +4199,6 @@
}
}
-static long needfree = 0;
-
typedef enum free_memory_reason_t {
FMR_UNKNOWN,
FMR_NEEDFREE,
@@ -4238,14 +4236,6 @@
free_memory_reason_t r = FMR_UNKNOWN;
#ifdef _KERNEL
- if (needfree > 0) {
- n = PAGESIZE * (-needfree);
- if (n < lowest) {
- lowest = n;
- r = FMR_NEEDFREE;
- }
- }
-
/*
* Cooperate with pagedaemon when it's time for it to scan
* and reclaim some pages.
@@ -4510,9 +4500,6 @@
int64_t to_free =
(arc_c >> arc_shrink_shift) - free_memory;
if (to_free > 0) {
-#ifdef _KERNEL
- to_free = MAX(to_free, ptob(needfree));
-#endif
arc_shrink(to_free);
}
} else if (free_memory < arc_c >> arc_no_grow_shift) {
@@ -4533,9 +4520,6 @@
* infinite loop.
*/
if (arc_size <= arc_c || evicted == 0) {
-#ifdef _KERNEL
- needfree = 0;
-#endif
/*
* We're either no longer overflowing, or we
* can't evict anything more, so we should wake
@@ -6310,9 +6294,7 @@
{
mutex_enter(&arc_reclaim_lock);
- /* XXX: Memory deficit should be passed as argument. */
- needfree = btoc(arc_c >> arc_shrink_shift);
- DTRACE_PROBE(arc__needfree);
+ DTRACE_PROBE1(arc__needfree, int64_t, ((int64_t)freemem - zfs_arc_free_target) * PAGESIZE);
cv_signal(&arc_reclaim_thread_cv);
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 25, 7:12 PM (12 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26163380
Default Alt Text
D12163.diff (1 KB)
Attached To
Mode
D12163: [RFC]: decrement needfree by the amount of evicted cache
Attached
Detach File
Event Timeline
Log In to Comment