* Wake up the dbuf eviction thread if the dbuf cache is at its max size. * If the dbuf cache is at its high water mark, then evict a dbuf from the * dbuf cache using the callers context. */
| 748 | * dbuf cache using the callers context. |
| 749 | */ |
| 750 | static void |
| 751 | dbuf_evict_notify(uint64_t size) |
| 752 | { |
| 753 | /* |
| 754 | * We check if we should evict without holding the dbuf_evict_lock, |
| 755 | * because it's OK to occasionally make the wrong decision here, |
| 756 | * and grabbing the lock results in massive lock contention. |
| 757 | */ |
| 758 | if (size > dbuf_cache_target_bytes()) { |
| 759 | if (size > dbuf_cache_hiwater_bytes()) |
| 760 | dbuf_evict_one(); |
| 761 | cv_signal(&dbuf_evict_cv); |
| 762 | } |
| 763 | } |
| 764 | |
| 765 | static int |
| 766 | dbuf_kstat_update(kstat_t *ksp, int rw) |
no test coverage detected