DL
Size: a a a
DL
DL
AF
YB
DL
DL
s
AF
LS
kenv
видно из какого путиYB
DL
DL
s
VO
static boolean_t
arc_adjust_cb_check(void *arg, zthr_t *zthr)
{
/*
* We have to rely on arc_get_data_impl() to tell us when to adjust,
* rather than checking if we are overflowing here, so that we are
* sure to not leave arc_get_data_impl() waiting on
* arc_adjust_waiters_cv. If we have become "not overflowing" since
* arc_get_data_impl() checked, we need to wake it up. We could
* broadcast the CV here, but arc_get_data_impl() may have not yet
* gone to sleep. We would need to use a mutex to ensure that this
* function doesn't broadcast until arc_get_data_impl() has gone to
* sleep (e.g. the arc_adjust_lock). However, the lock ordering of
* such a lock would necessarily be incorrect with respect to the
* zthr_lock, which is held before this function is called, and is
* held by arc_get_data_impl() when it calls zthr_wakeup().
*/
return (arc_adjust_needed);
}
static void
arc_reduce_target_size(int64_t to_free)
{
...
if (asize > arc_c) {
DTRACE_PROBE2(arc__shrink_adjust, uint64_t, asize,
uint64_t, arc_c);
/* See comment in arc_adjust_cb_check() on why lock+flag */
mutex_enter(&arc_adjust_lock);
arc_adjust_needed = B_TRUE;
mutex_exit(&arc_adjust_lock);
zthr_wakeup(arc_adjust_zthr);
}
}
VO
LS
LS