summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2007-05-31 22:52:15 +0000
committerattilio <attilio@FreeBSD.org>2007-05-31 22:52:15 +0000
commit7dd8ed88a925a943f1963baa072f4b6c6a8c9930 (patch)
tree10bf0f11ceeb18c6b03947eb85223abbbbf9cc67 /sys/compat
parent4681b4098bbf12784d009826b2223ace96a2306b (diff)
downloadFreeBSD-src-7dd8ed88a925a943f1963baa072f4b6c6a8c9930.zip
FreeBSD-src-7dd8ed88a925a943f1963baa072f4b6c6a8c9930.tar.gz
Revert VMCNT_* operations introduction.
Probabilly, a general approach is not the better solution here, so we should solve the sched_lock protection problems separately. Requested by: alc Approved by: jeff (mentor)
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linprocfs/linprocfs.c18
-rw-r--r--sys/compat/linux/linux_misc.c2
-rw-r--r--sys/compat/svr4/svr4_misc.c4
3 files changed, 12 insertions, 12 deletions
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c
index f9f2fd8..787ea1e 100644
--- a/sys/compat/linprocfs/linprocfs.c
+++ b/sys/compat/linprocfs/linprocfs.c
@@ -146,14 +146,14 @@ linprocfs_domeminfo(PFS_FILL_ARGS)
/*
* The correct thing here would be:
*
- memfree = VMCNT_GET(free_count) * PAGE_SIZE;
+ memfree = cnt.v_free_count * PAGE_SIZE;
memused = memtotal - memfree;
*
* but it might mislead linux binaries into thinking there
* is very little memory left, so we cheat and tell them that
* all memory that isn't wired down is free.
*/
- memused = VMCNT_GET(wire_count) * PAGE_SIZE;
+ memused = cnt.v_wire_count * PAGE_SIZE;
memfree = memtotal - memused;
swap_pager_status(&i, &j);
swaptotal = (unsigned long long)i * PAGE_SIZE;
@@ -175,7 +175,7 @@ linprocfs_domeminfo(PFS_FILL_ARGS)
* like unstaticizing it just for linprocfs's sake.
*/
buffers = 0;
- cached = VMCNT_GET(cache_count) * PAGE_SIZE;
+ cached = cnt.v_cache_count * PAGE_SIZE;
sbuf_printf(sb,
" total: used: free: shared: buffers: cached:\n"
@@ -394,12 +394,12 @@ linprocfs_dostat(PFS_FILL_ARGS)
"intr %u\n"
"ctxt %u\n"
"btime %lld\n",
- VMCNT_GET(vnodepgsin),
- VMCNT_GET(vnodepgsout),
- VMCNT_GET(swappgsin),
- VMCNT_GET(swappgsout),
- VMCNT_GET(intr),
- VMCNT_GET(swtch),
+ cnt.v_vnodepgsin,
+ cnt.v_vnodepgsout,
+ cnt.v_swappgsin,
+ cnt.v_swappgsout,
+ cnt.v_intr,
+ cnt.v_swtch,
(long long)boottime.tv_sec);
return (0);
}
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 28fc69b..e09310c 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -139,7 +139,7 @@ linux_sysinfo(struct thread *td, struct linux_sysinfo_args *args)
LINUX_SYSINFO_LOADS_SCALE / averunnable.fscale;
sysinfo.totalram = physmem * PAGE_SIZE;
- sysinfo.freeram = sysinfo.totalram - VMCNT_GET(wire_count) * PAGE_SIZE;
+ sysinfo.freeram = sysinfo.totalram - cnt.v_wire_count * PAGE_SIZE;
sysinfo.sharedram = 0;
mtx_lock(&vm_object_list_mtx);
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index 403919e..f1f44ea 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -778,14 +778,14 @@ svr4_sys_sysconfig(td, uap)
#if defined(UVM)
*retval = uvmexp.free; /* XXX: free instead of total */
#else
- *retval = VMCNT_GET(free_count); /* XXX: free instead of total */
+ *retval = cnt.v_free_count; /* XXX: free instead of total */
#endif
break;
case SVR4_CONFIG_AVPHYS_PAGES:
#if defined(UVM)
*retval = uvmexp.active; /* XXX: active instead of avg */
#else
- *retval = VMCNT_GET(active_count); /* XXX: active instead of avg */
+ *retval = cnt.v_active_count; /* XXX: active instead of avg */
#endif
break;
#endif /* NOTYET */
OpenPOWER on IntegriCloud