From owner-freebsd-hackers Wed Feb 28 5:33:10 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from hda.hda.com (host65.hda.com [63.104.68.65]) by hub.freebsd.org (Postfix) with ESMTP id C76B737B719 for ; Wed, 28 Feb 2001 05:33:06 -0800 (PST) (envelope-from dufault@hda.hda.com) Received: (from dufault@localhost) by hda.hda.com (8.11.1/8.11.1) id f1SDWPD27689 for hackers@freebsd.org; Wed, 28 Feb 2001 08:32:25 -0500 (EST) (envelope-from dufault) From: Peter Dufault Message-Id: <200102281332.f1SDWPD27689@hda.hda.com> Subject: memorylocked resource (was "Setting memory allocators...") To: hackers@freebsd.org Date: Wed, 28 Feb 2001 08:31:49 -0500 (EST) X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Why is the mlock(2) call restricted to the super user instead of enforcing it through per-user or per-login class limits? I was checking to see if most of the pieces were in place for "mlockall(MCL_FUTURE)" and noticed the "memorylocked infinity" setting in limits (I didn't know about memorylocked). Setting "memorylocked 0" for normal users is a flexible way to address this, then create a special class of programs that are permitted to do some locking. Along the same lines (matt probably knows the answer) is it easy to force paging in and locking down of any memory associated with a process so that mlockall(MCL_FUTURE) together with an appropriate memorylocked limit gives the requested memory semantics? I'd have to check through the specs to see how mmap() is supposed to play with mlockall(). Please leave aside most resource management issues for now, I'm assuming the main use for this is debugged small closed embedded systems, only bring up kickers. Peter -- Peter Dufault (dufault@hda.com) Realtime development, Machine control, HD Associates, Inc. Fail-Safe systems, Agency approval To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message