From owner-freebsd-current Wed Dec 11 10:01:56 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id KAA25648 for current-outgoing; Wed, 11 Dec 1996 10:01:56 -0800 (PST) Received: from smyrno.sol.net (smyrno.sol.net [206.55.64.117]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id KAA25621; Wed, 11 Dec 1996 10:01:49 -0800 (PST) Received: from solaria.sol.net (solaria.sol.net [206.55.65.75]) by smyrno.sol.net (8.8.3/8.8.3) with SMTP id MAA23800; Wed, 11 Dec 1996 12:01:16 -0600 (CST) Received: from localhost by solaria.sol.net (8.5/8.5) id MAA04254; Wed, 11 Dec 1996 12:01:46 -0600 From: Joe Greco Message-Id: <199612111801.MAA04254@solaria.sol.net> Subject: Re: mlocking an mmap'ped region? To: dyson@FreeBSD.ORG Date: Wed, 11 Dec 96 12:01:44 CST Cc: current@FreeBSD.ORG In-Reply-To: <199612111727.MAA03619@dyson.iquest.net> from "John Dyson" at Dec 11, 96 12:27:45 pm X-Mailer: ELM [version 2.4dev PL65] MIME-Version: 1.0 Content-Type: text Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > The following does not seem to work on a 2.2-CURRENT box (built yesterday). > > It does seem to work on SunOS. > > > > Is it just too early to be doing programming or is there really something > > preventing me from doing this? > > Yep, it is called broken code :-(. That problem was just brought to my > attention yesterday. Unfortunately, someone also wants it fixed in 2.1.X :-(. > > 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. > > (BTW, I seem to remember that someone had found this problem a year or > so ago, and it fell through the cracks.) Hi! Might have been me, actually... I like coercing the system into doing what I really want it to do by tricks such as these. :-) I have a PPro200 sitting here and I was going to do a "find /usr/src -type f -print | mlock-files" before doing a make world and see what happened. With 224MB RAM and the /usr/src only taking 160MB of disk I figured it would be lots of fun to load all my source code into RAM and then make world. In any case, thanks... I was banging my head against a wall and I had done lots of things to find my "problem", then tried it on SunOS and it worked fine. :-/ So I started snooping around the kernel source code and decided that I did not want to try to comprehend the inner workings of vm_map_pageable (I had found the "return (error == KERN_SUCCESS ? 0 : ENOMEM);" and decided I was in over my head if it was a FreeBSD thing, when I started looking at vm_map_pageable's code). ... Joe ------------------------------------------------------------------------------- Joe Greco - Systems Administrator jgreco@ns.sol.net Solaria Public Access UNIX - Milwaukee, WI 414/342-4847