Subject: Re: uvm_km_valloc_align() and USPACE (Re: CVS commit: syssrc)
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Jason R Thorpe <thorpej@zembu.com>
List: tech-kern
Date: 11/30/2000 09:59:40
On Fri, Dec 01, 2000 at 02:10:35AM +0900, Izumi Tsutsui wrote:
> Index: kern/kern_fork.c
> ===================================================================
> RCS file: /cvsroot/syssrc/sys/kern/kern_fork.c,v
> retrieving revision 1.77
> diff -u -r1.77 kern_fork.c
> --- kern/kern_fork.c 2000/11/27 04:36:41 1.77
> +++ kern/kern_fork.c 2000/11/30 17:02:27
> @@ -65,6 +65,10 @@
>
> #include <uvm/uvm_extern.h>
>
> +#ifndef USPACE_ALIGN
> +#define USPACE_ALIGN NBPG
> +#endif
> +
s/NBPG/PAGE_SIZE/ please.
I would also prefer that USPACE_ALIGN simply be defined in all vmparam.h
files.
> int nprocs = 1; /* process 0 */
>
> /*ARGSUSED*/
> @@ -145,7 +149,7 @@
> * kernel virtual address space. The actual U-area pages will
> * be allocated and wired in vm_fork().
> */
> - uaddr = uvm_km_valloc_align(kernel_map, USPACE, USPACE);
> + uaddr = uvm_km_valloc_align(kernel_map, USPACE, USPACE_ALIGN);
> if (__predict_false(uaddr == 0)) {
> (void)chgproccnt(uid, -1);
> nprocs--;
--
-- Jason R. Thorpe <thorpej@zembu.com>