From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 18 14:48:53 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E218106566C for ; Mon, 18 Jul 2011 14:48:53 +0000 (UTC) (envelope-from uffe@uffe.org) Received: from mail.starion.dk (mx0.starion.dk [93.162.70.34]) by mx1.freebsd.org (Postfix) with SMTP id 68FD08FC16 for ; Mon, 18 Jul 2011 14:48:51 +0000 (UTC) Received: (qmail 97158 invoked by uid 1004); 18 Jul 2011 14:48:54 -0000 Message-ID: <4E244797.80109@uffe.org> Date: Mon, 18 Jul 2011 16:47:51 +0200 From: Uffe Jakobsen X-Mozilla-Draft-Info: internal/draft; vcard=0; receipt=0; DSN=0; uuencode=0 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Mnenhy/0.8.3 Thunderbird/3.1.11 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4E2427E4.5080201@uffe.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: mdf@FreeBSD.org Subject: Re: [PATCH] sysctl cleanup - unifying sysctls: vm.kvm_size and vm.kvm_free X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2011 14:48:53 -0000 On 2011-07-18 15:54, mdf@FreeBSD.org wrote: > On Mon, Jul 18, 2011 at 5:32 AM, Uffe Jakobsen wrote: >> Please consider this patch - it unifies sysctls: vm.kvm_size and >> vm.kvm_free. >> >> Currently these sysctls are only found under i386 and amd64: >> >> sys/i386/i386/pmap.c >> sys/i386/xen/pmap.c >> sys/amd64/amd64/pmap.c >> >> It seems logical (to me) to move them into a generic location suce as >> sys/vm/vm_kern.c >> >> Patch against HEAD (revision 224180) attached. > > I don't believe that VM_MAX_KERNEL_ADDRESS is relevant to all > architectures, which is why these sysctls are in i386/amd64 specific > files. > Well I'm not an expert - but I did some checking before submitting this patch. As far as I can see VM_MAX_KERNEL_ADDRESS is addressed in several generic kernel files: sys/kern/subr_param.c sys/vm/vm_map.c sys/vm/vm_object.c and as far as I can see these locations are not ifdef'ed with any platform specific condition. Further more the following platform-specific files defines VM_MAX_KERNEL_ADDRESS: sys/amd64/include/vmparam.h sys/arm/include/vmparam.h sys/i386/include/vmparam.h sys/ia64/include/vmparam.h sys/mips/include/vmparam.h sys/powerpc/include/vmparam.h sys/sparc64/include/vmparam.h That leaves us only with "pc98" and "x86" platform-specifics subdirs that does not directly define VM_MAX_KERNEL_ADDRESS sys/pc98/include/vmparam.h includes "i386/vmparam.h" which defines VM_MAX_KERNEL_ADDRESS While "x86" subdir is a little more questionable - though it has several includes for machine/vmparam.h which defines VM_MAX_KERNEL_ADDRESS Could soneone please give me an indication of what would be the correct way for me to verify this in a more "scientific" way. I've only got access to i386 and amd64 hardware but would cross-platform compiling for all platforms be a sufficient way of verifying this ? Thanks in advance. Kind regards Uffe