diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2014-03-22 10:26:09 +0000 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2014-03-22 10:26:09 +0000 |
commit | 6fcf6199a4a9aefe9f2e59d947f0e0df171367b5 (patch) | |
tree | 9a9561ab626d2c7b17fbd98a498de2fac743ab08 /sys/cddl | |
parent | e97a0e252b398acead00694bf1d357d9089128ad (diff) | |
download | FreeBSD-src-6fcf6199a4a9aefe9f2e59d947f0e0df171367b5.zip FreeBSD-src-6fcf6199a4a9aefe9f2e59d947f0e0df171367b5.tar.gz |
Rename global cnt to vm_cnt to avoid shadowing.
To reduce the diff struct pcu.cnt field was not renamed, so
PCPU_OP(cnt.field) is still used. pc_cnt and pcpu are also used in
kvm(3) and vmstat(8). The goal was to not affect externally used KPI.
Bump __FreeBSD_version_ in case some out-of-tree module/code relies on the
the global cnt variable.
Exp-run revealed no ports using it directly.
No objection from: arch@
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sys/cddl')
-rw-r--r-- | sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c | 2 | ||||
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c | 4 | ||||
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c b/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c index 543a3a6..daedc89 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c @@ -120,7 +120,7 @@ static void kmem_size_init(void *unused __unused) { - kmem_size_val = (uint64_t)cnt.v_page_count * PAGE_SIZE; + kmem_size_val = (uint64_t)vm_cnt.v_page_count * PAGE_SIZE; if (kmem_size_val > vm_kmem_size) kmem_size_val = vm_kmem_size; } diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c index 0552905..bc4989e 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c @@ -3877,7 +3877,7 @@ arc_memory_throttle(uint64_t reserve, uint64_t txg) { #ifdef _KERNEL uint64_t available_memory = - ptoa((uintmax_t)cnt.v_free_count + cnt.v_cache_count); + ptoa((uintmax_t)vm_cnt.v_free_count + vm_cnt.v_cache_count); static uint64_t page_load = 0; static uint64_t last_txg = 0; @@ -3888,7 +3888,7 @@ arc_memory_throttle(uint64_t reserve, uint64_t txg) #endif #endif /* sun */ - if (cnt.v_free_count + cnt.v_cache_count > + if (vm_cnt.v_free_count + vm_cnt.v_cache_count > (uint64_t)physmem * arc_lotsfree_percent / 100) return (0); diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c index 8eb8953..7ce41a1 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c @@ -2347,7 +2347,7 @@ zfs_vnodes_adjust(void) * vntblinit(). If it is equal to desiredvnodes, it means that * it wasn't tuned by the administrator and we can tune it down. */ - newdesiredvnodes = min(maxproc + cnt.v_page_count / 4, 2 * + newdesiredvnodes = min(maxproc + vm_cnt.v_page_count / 4, 2 * vm_kmem_size / (5 * (sizeof(struct vm_object) + sizeof(struct vnode)))); if (newdesiredvnodes == desiredvnodes) |