aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/vmmeter.h
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2014-03-22 10:26:09 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2014-03-22 10:26:09 +0000
commit44f1c916109d4d88941d257b7c4c96c26ab55477 (patch)
tree9a9561ab626d2c7b17fbd98a498de2fac743ab08 /sys/sys/vmmeter.h
parent856c73664bf3a16293fd3acf80e85eba1fdba278 (diff)
downloadsrc-44f1c916109d4d88941d257b7c4c96c26ab55477.tar.gz
src-44f1c916109d4d88941d257b7c4c96c26ab55477.zip
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
Notes
Notes: svn path=/head/; revision=263620
Diffstat (limited to 'sys/sys/vmmeter.h')
-rw-r--r--sys/sys/vmmeter.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/sys/vmmeter.h b/sys/sys/vmmeter.h
index d2ad920a4066..92d7cc60f5b6 100644
--- a/sys/sys/vmmeter.h
+++ b/sys/sys/vmmeter.h
@@ -116,7 +116,7 @@ struct vmmeter {
};
#ifdef _KERNEL
-extern struct vmmeter cnt;
+extern struct vmmeter vm_cnt;
extern int vm_pageout_wakeup_thresh;
@@ -131,7 +131,8 @@ static __inline
int
vm_page_count_severe(void)
{
- return (cnt.v_free_severe > (cnt.v_free_count + cnt.v_cache_count));
+ return (vm_cnt.v_free_severe > (vm_cnt.v_free_count +
+ vm_cnt.v_cache_count));
}
/*
@@ -148,7 +149,7 @@ static __inline
int
vm_page_count_min(void)
{
- return (cnt.v_free_min > (cnt.v_free_count + cnt.v_cache_count));
+ return (vm_cnt.v_free_min > (vm_cnt.v_free_count + vm_cnt.v_cache_count));
}
/*
@@ -160,7 +161,8 @@ static __inline
int
vm_page_count_target(void)
{
- return (cnt.v_free_target > (cnt.v_free_count + cnt.v_cache_count));
+ return (vm_cnt.v_free_target > (vm_cnt.v_free_count +
+ vm_cnt.v_cache_count));
}
/*
@@ -172,7 +174,8 @@ static __inline
int
vm_paging_target(void)
{
- return (cnt.v_free_target - (cnt.v_free_count + cnt.v_cache_count));
+ return (vm_cnt.v_free_target - (vm_cnt.v_free_count +
+ vm_cnt.v_cache_count));
}
/*
@@ -183,7 +186,8 @@ static __inline
int
vm_paging_needed(void)
{
- return (cnt.v_free_count + cnt.v_cache_count < vm_pageout_wakeup_thresh);
+ return (vm_cnt.v_free_count + vm_cnt.v_cache_count <
+ vm_pageout_wakeup_thresh);
}
#endif