Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jan 2003 11:39:24 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Scott Long <scott_long@btc.adaptec.com>
Cc:        Craig Rodrigues <rodrigc@attbi.com>, Will Andrews <will@csociety.org>, Joe Marcus Clarke <marcus@marcuscom.com>, <freebsd-current@FreeBSD.ORG>, <dillon@FreeBSD.ORG>, <hiten@unixdaemons.org>
Subject:   Re: VM_METER no longer defined?
Message-ID:  <20030118113413.H9750-100000@gamplex.bde.org>
In-Reply-To: <3E28943E.3000702@btc.adaptec.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Fri, 17 Jan 2003, Scott Long wrote:

> Craig Rodrigues wrote:
> > Index: vm_param.h
> > ===================================================================
> > RCS file: /home/ncvs/src/sys/vm/vm_param.h,v
> > retrieving revision 1.16
> > diff -u -r1.16 vm_param.h
> > --- vm_param.h	2003/01/11 07:29:46	1.16
> > +++ vm_param.h	2003/01/17 23:25:52
> > @@ -89,6 +89,8 @@
> >  #define VM_SWAPPING_ENABLED	11	/* swapping enabled */
> >  #define	VM_MAXID		12	/* number of valid vm ids */
> >
> > +#define VM_METER	VM_TOTAL /* backwards compatibility, struct vmmeter */
> > +
> >  #define CTL_VM_NAMES { \
> >  	{ 0, 0 }, \
> >  	{ "vmtotal", CTLTYPE_STRUCT }, \
> >
> > The only place where VM_METER is used in this directory was in vm_meter.c:
> >
> >     240 SYSCTL_PROC(_vm, VM_METER, vmmeter, CTLTYPE_OPAQUE|CTLFLAG_RD,
> >     241     0, sizeof(struct vmtotal), vmtotal, "S,vmtotal",
> >     242     "System virtual memory statistics");
> >
> > This changed to:
> >
> >     240 SYSCTL_PROC(_vm, VM_TOTAL, vmtotal, CTLTYPE_OPAQUE|CTLFLAG_RD,
> >     241     0, sizeof(struct vmtotal), vmtotal, "S,vmtotal",
> >     242     "System virtual memory statistics");

The sysctl name was changed too (from the confusing but compatible
"vm.vmmeter" to "vm.vmtotal".

The change was mainly about printing the results of the sysctl in sysctl(8).
See followup mail.

> This is ugly and only further perpetuates what appears to be a
> gratuitous API
> change.  Let's wait to hear from the submitter (Hiten) and committer
> (Matt) to
> see why this was needed in the first place.

If this change is kept, don't forget to keep the man page (sysctl.3)
to be consistent with the code again.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030118113413.H9750-100000>