Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Dec 1996 14:53:40 -0500 (EST)
From:      John Dyson <dyson@dyson.iquest.net>
To:        bugs@freebsd.netcom.com (Mark Hittinger)
Cc:        current@freebsd.org
Subject:   Re: mlocking an mmap'ped region? (fwd)
Message-ID:  <199612111953.OAA03843@dyson.iquest.net>
In-Reply-To: <199612111800.MAA00824@freebsd.netcom.com> from "Mark Hittinger" at Dec 11, 96 12:00:47 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > 
> > I'll probably get it fixed in -current in the next day or so.  Doing mlock
> > the way that it is currently done is problematical from a couple of viewpoints,
> > so I think it is going to need to be reworked.  Basically, the original
> > way of doing vm_map_pageable is wrong for userland pages.
> 
> Isn't this also a big problem on SMP?  :-)
> 
It might be, but maybe not.  vm_map_pageable actually does three things,
wires the pages, puts the pages into the address space (faulting them),
and marks the map entry wired.  I think that the way that it does them
is wrong for userland, and also there are some bad consequences during
fork for wired map entries.  I don't think that object chains
are being handled properly in the code (last time that I looked.)

I haven't done enough of an analysis on what needs to be done to stake
a claim on a solution.  I think that there are two (high level) problems
with our memory lock code.  Firstly, vm_map_pageable is not right for
user land, and secondly we have not concept of a process lock (but
just an address space lock.)  I think that we need both, and mlock doesn't
do everything that people want (esp regarding new pages.)

John




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