Skip to content

Commit

Permalink
fix freebsd
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrens committed Jul 21, 2020
1 parent 00b9fa5 commit e58dc11
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions module/os/freebsd/zfs/arc_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ extern struct vfsops zfs_vfsops;

uint_t zfs_arc_free_target = 0;

int64_t last_free_memory;
free_memory_reason_t last_free_reason;

static void
arc_free_target_init(void *unused __unused)
{
Expand Down Expand Up @@ -99,7 +96,6 @@ arc_available_memory(void)
{
int64_t lowest = INT64_MAX;
int64_t n __unused;
free_memory_reason_t r = FMR_UNKNOWN;

/*
* Cooperate with pagedaemon when it's time for it to scan
Expand All @@ -108,7 +104,6 @@ arc_available_memory(void)
n = PAGESIZE * ((int64_t)freemem - zfs_arc_free_target);
if (n < lowest) {
lowest = n;
r = FMR_LOTSFREE;
}
#if defined(__i386) || !defined(UMA_MD_SMALL_ALLOC)
/*
Expand All @@ -125,13 +120,10 @@ arc_available_memory(void)
n = uma_avail() - (long)(uma_limit() / 4);
if (n < lowest) {
lowest = n;
r = FMR_HEAP_ARENA;
}
#endif

last_free_memory = lowest;
last_free_reason = r;
DTRACE_PROBE2(arc__available_memory, int64_t, lowest, int, r);
DTRACE_PROBE1(arc__available_memory, int64_t, lowest);
return (lowest);
}

Expand Down Expand Up @@ -223,9 +215,6 @@ arc_lowmem(void *arg __unused, int howto __unused)
DTRACE_PROBE2(arc__needfree, int64_t, free_memory, int64_t, to_free);
arc_reduce_target_size(to_free);

mutex_enter(&arc_adjust_lock);
arc_adjust_needed = B_TRUE;
zthr_wakeup(arc_adjust_zthr);
/*
* It is unsafe to block here in arbitrary threads, because we can come
* here from ARC itself and may hold ARC locks and thus risk a deadlock
Expand Down

0 comments on commit e58dc11

Please sign in to comment.