Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Aug 2004 17:47:01 -0400
From:      Brian Fundakowski Feldman <green@FreeBSD.org>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/vm vm_kern.c vm_map.c vm_map.h
Message-ID:  <20040809214701.GE14657@green.homeunix.org>
In-Reply-To: <20040809165215.A84463@grasshopper.cs.duke.edu>
References:  <200408091952.i79JqT4B076245@repoman.freebsd.org> <20040809165215.A84463@grasshopper.cs.duke.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 09, 2004 at 04:52:15PM -0400, Andrew Gallatin wrote:
> Brian Feldman [green@FreeBSD.org] wrote:
> 
> >   * Require all mappings to be unwired before they are deleted.
> >     When VM space is still wired upon deletion, it will be waited
> >     upon for the following unwire.  This makes vslock(9) work
> >     rather than allowing kernel-locked memory to be deleted
> >     out from underneath of its consumer as it would before.
> 
> Can you explain in a little more detail what would happen now in the
> following scenario:
> 
> An application running in userspace allocates SIZE bytes at "addr",
> either with an mmap or via sbrk.  Then something in the kernel calls:
> vm_map_wire(map, addr, addr + SIZE, TRUE) on its behalf.
> Then the application frees (or munmaps) "addr".
> 
> Does the application sleep waiting for something to unwire addr+SIZE?

Yes, that is exactly what happens (replace TRUE with appropriate
current flags); is there some other behavior you would expect to see?

-- 
Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
  <> green@FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\



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