Page MenuHomeFreeBSD

D12163.id32789.diff
No OneTemporary

D12163.id32789.diff

Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
===================================================================
--- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
+++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
@@ -4171,8 +4171,6 @@
}
}
-static long needfree = 0;
-
typedef enum free_memory_reason_t {
FMR_UNKNOWN,
FMR_NEEDFREE,
@@ -4210,14 +4208,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.
@@ -4482,9 +4472,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) {
@@ -4505,9 +4492,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
@@ -6282,9 +6266,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

Mime Type
text/plain
Expires
Wed, Jun 24, 9:02 PM (1 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34293172
Default Alt Text
D12163.id32789.diff (1 KB)

Event Timeline