From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 18 16:33:56 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 2CCFD1065670 for ; Mon, 18 Jul 2011 16:33:56 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id DC3208FC14 for ; Mon, 18 Jul 2011 16:33:55 +0000 (UTC) Received: by qyk38 with SMTP id 38so2218896qyk.13 for ; Mon, 18 Jul 2011 09:33:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=nV7vOR7eeFO6zmsvV8/2GbxA9cR0S2dYvkxOJTPl9rk=; b=lTnmrm6AR+kwFTRyTBalKwPVa0v8vlj+nfRKZnYm4LDqe169gN2U+s28eGuHIEgQBX 7x+sV9hg81PEZD9vuB2nVWV3GqLOYC4aHH6WoBgE7heGF2VAtYcQh1GYzF8QFGkmB8jO Pn2KvDqgm/C/qQshiw0kLtdpGzOLW/sw0aEk0= MIME-Version: 1.0 Received: by 10.229.190.83 with SMTP id dh19mr5030439qcb.175.1311006835001; Mon, 18 Jul 2011 09:33:55 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.229.11.40 with HTTP; Mon, 18 Jul 2011 09:33:54 -0700 (PDT) In-Reply-To: <4E244797.80109@uffe.org> References: <4E2427E4.5080201@uffe.org> <4E244797.80109@uffe.org> Date: Mon, 18 Jul 2011 09:33:54 -0700 X-Google-Sender-Auth: 2JkrrZZvcj8BQ-_odBXDvSSD8N4 Message-ID: From: mdf@FreeBSD.org To: Uffe Jakobsen Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@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 16:33:56 -0000 On Mon, Jul 18, 2011 at 7:47 AM, Uffe Jakobsen wrote: > On 2011-07-18 15:54, mdf@FreeBSD.org wrote: >> On Mon, Jul 18, 2011 at 5:32 AM, Uffe Jakobsen =A0wrote: >>> >>> 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 platfor= m > 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 w= ay > for me to verify this in a more "scientific" way. Alan Cox is usually a definitive answer for FreeBSD vm questions. My recollection was in the context of a bug with memguard(9) on sparc64, however now that I refresh my memory the issue there was VM_KMEM_SIZE_MAX, not VM_MAX_KERNEL_ADDRESS. So, my apologies as my memory has led me astray. Cheers, matthew