From owner-freebsd-current Wed Dec 11 11:53:55 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id LAA03947 for current-outgoing; Wed, 11 Dec 1996 11:53:55 -0800 (PST) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id LAA03942 for ; Wed, 11 Dec 1996 11:53:51 -0800 (PST) Received: (from root@localhost) by dyson.iquest.net (8.8.2/8.6.9) id OAA03843; Wed, 11 Dec 1996 14:53:40 -0500 (EST) From: John Dyson Message-Id: <199612111953.OAA03843@dyson.iquest.net> Subject: Re: mlocking an mmap'ped region? (fwd) To: bugs@freebsd.netcom.com (Mark Hittinger) Date: Wed, 11 Dec 1996 14:53:40 -0500 (EST) Cc: current@freebsd.org In-Reply-To: <199612111800.MAA00824@freebsd.netcom.com> from "Mark Hittinger" at Dec 11, 96 12:00:47 pm Reply-To: dyson@freebsd.org X-Mailer: ELM [version 2.4 PL24 ME8] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > > > 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