Changeset View
Changeset View
Standalone View
Standalone View
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
Show First 20 Lines • Show All 126 Lines • ▼ Show 20 Lines | |||||
#include <sys/arc.h> | #include <sys/arc.h> | ||||
#include <sys/refcount.h> | #include <sys/refcount.h> | ||||
#include <sys/vdev.h> | #include <sys/vdev.h> | ||||
#include <sys/vdev_impl.h> | #include <sys/vdev_impl.h> | ||||
#include <sys/dsl_pool.h> | #include <sys/dsl_pool.h> | ||||
#include <sys/multilist.h> | #include <sys/multilist.h> | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#include <sys/dnlc.h> | #include <sys/dnlc.h> | ||||
#include <sys/racct.h> | |||||
#endif | #endif | ||||
#include <sys/callb.h> | #include <sys/callb.h> | ||||
#include <sys/kstat.h> | #include <sys/kstat.h> | ||||
#include <sys/trim_map.h> | #include <sys/trim_map.h> | ||||
#include <zfs_fletcher.h> | #include <zfs_fletcher.h> | ||||
#include <sys/sdt.h> | #include <sys/sdt.h> | ||||
#include <vm/vm_pageout.h> | #include <vm/vm_pageout.h> | ||||
▲ Show 20 Lines • Show All 4,355 Lines • ▼ Show 20 Lines | if (hdr != NULL && HDR_HAS_L1HDR(hdr) && hdr->b_l1hdr.b_datacnt > 0) { | ||||
ASSERT3U(hdr->b_size, ==, size); | ASSERT3U(hdr->b_size, ==, size); | ||||
DTRACE_PROBE4(arc__miss, arc_buf_hdr_t *, hdr, blkptr_t *, bp, | DTRACE_PROBE4(arc__miss, arc_buf_hdr_t *, hdr, blkptr_t *, bp, | ||||
uint64_t, size, zbookmark_phys_t *, zb); | uint64_t, size, zbookmark_phys_t *, zb); | ||||
ARCSTAT_BUMP(arcstat_misses); | ARCSTAT_BUMP(arcstat_misses); | ||||
ARCSTAT_CONDSTAT(!HDR_PREFETCH(hdr), | ARCSTAT_CONDSTAT(!HDR_PREFETCH(hdr), | ||||
demand, prefetch, !HDR_ISTYPE_METADATA(hdr), | demand, prefetch, !HDR_ISTYPE_METADATA(hdr), | ||||
data, metadata, misses); | data, metadata, misses); | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#ifdef RACCT | |||||
if (racct_enable) { | |||||
PROC_LOCK(curproc); | |||||
racct_add_force(curproc, RACCT_READBPS, size); | |||||
racct_add_force(curproc, RACCT_READIOPS, 1); | |||||
PROC_UNLOCK(curproc); | |||||
} | |||||
#endif /* RACCT */ | |||||
curthread->td_ru.ru_inblock++; | curthread->td_ru.ru_inblock++; | ||||
#endif | #endif | ||||
if (priority == ZIO_PRIORITY_ASYNC_READ) | if (priority == ZIO_PRIORITY_ASYNC_READ) | ||||
hdr->b_flags |= ARC_FLAG_PRIO_ASYNC_READ; | hdr->b_flags |= ARC_FLAG_PRIO_ASYNC_READ; | ||||
else | else | ||||
hdr->b_flags &= ~ARC_FLAG_PRIO_ASYNC_READ; | hdr->b_flags &= ~ARC_FLAG_PRIO_ASYNC_READ; | ||||
▲ Show 20 Lines • Show All 2,507 Lines • Show Last 20 Lines |