Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jul 2011 16:47:51 +0200
From:      Uffe Jakobsen <uffe@uffe.org>
To:        freebsd-hackers@freebsd.org
Cc:        mdf@FreeBSD.org
Subject:   Re: [PATCH] sysctl cleanup - unifying sysctls: vm.kvm_size and	vm.kvm_free
Message-ID:  <4E244797.80109@uffe.org>
In-Reply-To: <CAMBSHm-Ga0-X6fzEPB_tVPAuW5qwJ4RJXM8UEy8nwuGRAryrEg@mail.gmail.com>
References:  <4E2427E4.5080201@uffe.org> <CAMBSHm-Ga0-X6fzEPB_tVPAuW5qwJ4RJXM8UEy8nwuGRAryrEg@mail.gmail.com>

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


On 2011-07-18 15:54, mdf@FreeBSD.org wrote:
> On Mon, Jul 18, 2011 at 5:32 AM, Uffe Jakobsen<uffe@uffe.org>  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






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E244797.80109>