From owner-freebsd-current Fri Jan 17 15:43: 3 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED02537B401; Fri, 17 Jan 2003 15:43:00 -0800 (PST) Received: from magic.adaptec.com (magic.adaptec.com [208.236.45.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52C2843F1E; Fri, 17 Jan 2003 15:43:00 -0800 (PST) (envelope-from scott_long@btc.adaptec.com) Received: from redfish.adaptec.com (redfish.adaptec.com [162.62.50.11]) by magic.adaptec.com (8.11.6+Sun/8.11.6) with ESMTP id h0HNglj06290; Fri, 17 Jan 2003 15:42:47 -0800 (PST) Received: from btc.btc.adaptec.com (btc.btc.adaptec.com [10.100.0.52]) by redfish.adaptec.com (8.8.8+Sun/8.8.8) with ESMTP id PAA15833; Fri, 17 Jan 2003 15:42:41 -0800 (PST) Received: from btc.adaptec.com (hollin [10.100.253.56]) by btc.btc.adaptec.com (8.8.8+Sun/8.8.8) with ESMTP id QAA19243; Fri, 17 Jan 2003 16:42:36 -0700 (MST) Message-ID: <3E28943E.3000702@btc.adaptec.com> Date: Fri, 17 Jan 2003 16:39:42 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2b) Gecko/20021216 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Craig Rodrigues Cc: Will Andrews , Joe Marcus Clarke , freebsd-current@freebsd.org, dillon@freebsd.org, hiten@unixdaemons.org Subject: Re: VM_METER no longer defined? References: <3E284083.3030504@btc.adaptec.com> <1042826526.328.24.camel@gyros> <20030117182610.GR30015@procyon.firepipe.net> <20030117232821.GA5237@attbi.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Craig Rodrigues wrote: > On Fri, Jan 17, 2003 at 10:26:10AM -0800, Will Andrews wrote: > > >Of course, these things can be fixed. But I consider this change > >gratuitous and it breaks standard compatability rules: deprecate > >for one major version and remove in the second. I haven't seen > >any reason why this couldn't be added to vm/vm_param.h: > > > >#define VM_METER VM_TOTAL > > > >for compatability purposes. This change is way too sudden in an > >external API (if it's supposed to be internal, then protect it > >with an #ifdef _KERNEL already!). > > > How about this then: > > > 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"); > > > 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. Hiten? Matt? Scott To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message