MCPcopy Create free account
hub / github.com/F-Stack/f-stack / dbuf_evict_notify

Function dbuf_evict_notify

freebsd/contrib/openzfs/module/zfs/dbuf.c:750–763  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

748 * dbuf cache using the callers context.
749 */
750static void
751dbuf_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
765static int
766dbuf_kstat_update(kstat_t *ksp, int rw)

Callers 1

dbuf_rele_and_unlockFunction · 0.85

Calls 4

dbuf_cache_target_bytesFunction · 0.85
dbuf_cache_hiwater_bytesFunction · 0.85
dbuf_evict_oneFunction · 0.85
cv_signalFunction · 0.50

Tested by

no test coverage detected