Subject: Re: Add a MAP_ALIGNED flag for mmap(2).
To: Matt Thomas <matt@3am-software.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 03/02/2003 12:25:18
On Sun, 2 Mar 2003, Matt Thomas wrote:

> At 10:29 AM 3/2/2003, Jason R Thorpe wrote:
> >On Sun, Mar 02, 2003 at 01:13:28AM -0800, Matt Thomas wrote:
> >
> >I don't really like the flags thing .. I'd say either your first proposal,
> >or a new mmap call that takes an additional alignment argument.
>
> I actually like the flags method.  It's much simplier than having a second
> syscall.  It also means that uvm_mmap doesn't need to take another argument
> and the code that calls it doesn't have to change.

While I see the purity of adding an extra argument, I like the idea of
using flags. We have a good number open, and using them would mean not
changing a lot of called routines.

I also like listing the alignment in terms of bytes, not pages, since it
means userland code doesn't care what the internal page size is. Also it
might help emulation if future systems raise the page size (like say we go
from 4k to 8k or 8k to 16k as part of a CPU transition) - we don't have to
keep track of the implicit page size.

Take care,

Bill