Adjust ARC terminology

The process of evicting data from the ARC is referred to as
`arc_adjust`.

This commit changes the term to `arc_evict`, which is more specific.

Reviewed-by: George Wilson <gwilson@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #10592
This commit is contained in:
Matthew Ahrens
2020-07-22 09:51:47 -07:00
committed by GitHub
parent 317dbea173
commit 5dd92909c6
4 changed files with 97 additions and 97 deletions
+5 -5
View File
@@ -223,9 +223,9 @@ 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);
mutex_enter(&arc_evict_lock);
arc_evict_needed = B_TRUE;
zthr_wakeup(arc_evict_zthr);
/*
* It is unsafe to block here in arbitrary threads, because we can come
@@ -233,8 +233,8 @@ arc_lowmem(void *arg __unused, int howto __unused)
* with ARC reclaim thread.
*/
if (curproc == pageproc)
(void) cv_wait(&arc_adjust_waiters_cv, &arc_adjust_lock);
mutex_exit(&arc_adjust_lock);
(void) cv_wait(&arc_evict_waiters_cv, &arc_evict_lock);
mutex_exit(&arc_evict_lock);
}
void
+10 -10
View File
@@ -194,12 +194,12 @@ arc_shrinker_scan(struct shrinker *shrink, struct shrink_control *sc)
return (SHRINK_STOP);
/* Reclaim in progress */
if (mutex_tryenter(&arc_adjust_lock) == 0) {
if (mutex_tryenter(&arc_evict_lock) == 0) {
ARCSTAT_INCR(arcstat_need_free, ptob(sc->nr_to_scan));
return (0);
}
mutex_exit(&arc_adjust_lock);
mutex_exit(&arc_evict_lock);
/*
* Evict the requested number of pages by shrinking arc_c the
@@ -213,17 +213,17 @@ arc_shrinker_scan(struct shrinker *shrink, struct shrink_control *sc)
* drastically, potentially all the way to arc_c_min. While
* arc_c is below arc_size, ZFS can't process read/write
* requests, because arc_get_data_impl() will block. To
* ensure that arc_c doesn't shrink faster than the adjust
* ensure that arc_c doesn't shrink faster than the evict
* thread can keep up, we wait for eviction here.
*/
mutex_enter(&arc_adjust_lock);
mutex_enter(&arc_evict_lock);
if (arc_is_overflowing()) {
arc_adjust_needed = B_TRUE;
zthr_wakeup(arc_adjust_zthr);
(void) cv_wait(&arc_adjust_waiters_cv,
&arc_adjust_lock);
arc_evict_needed = B_TRUE;
zthr_wakeup(arc_evict_zthr);
(void) cv_wait(&arc_evict_waiters_cv,
&arc_evict_lock);
}
mutex_exit(&arc_adjust_lock);
mutex_exit(&arc_evict_lock);
if (current_is_kswapd())
arc_kmem_reap_soon();
@@ -232,7 +232,7 @@ arc_shrinker_scan(struct shrinker *shrink, struct shrink_control *sc)
/*
* We've shrunk what we can, wake up threads.
*/
cv_broadcast(&arc_adjust_waiters_cv);
cv_broadcast(&arc_evict_waiters_cv);
} else
pages = SHRINK_STOP;