From mohacsi@norfolk.ki.iif.hu  Fri Sep 27 09:18:30 2002
Return-Path: <mohacsi@norfolk.ki.iif.hu>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6C98537B401
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 27 Sep 2002 09:18:30 -0700 (PDT)
Received: from norfolk.ki.iif.hu (norfolk.ki.iif.hu [193.6.222.32])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 869BE43E77
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 27 Sep 2002 09:18:29 -0700 (PDT)
	(envelope-from mohacsi@norfolk.ki.iif.hu)
Received: (from mohacsi@localhost)
	by norfolk.ki.iif.hu (8.12.6/8.12.5) id g8RGIN2B002129;
	Fri, 27 Sep 2002 18:18:23 +0200 (CEST)
	(envelope-from mohacsi)
Message-Id: <200209271618.g8RGIN2B002129@norfolk.ki.iif.hu>
Date: Fri, 27 Sep 2002 18:18:23 +0200 (CEST)
From: Janos Mohacsi <mohacsi@norfolk.ki.iif.hu>
Reply-To: Janos Mohacsi <janos.mohacsi@bsd.hu>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: mlockall and munlockall system calls are missing from FreeBSD
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         43426
>Category:       kern
>Synopsis:       mlockall and munlockall system calls are missing from FreeBSD
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bms
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          wish
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 27 09:20:05 PDT 2002
>Closed-Date:    Sat Nov 15 00:41:17 PST 2003
>Last-Modified:  Sat Nov 15 00:41:17 PST 2003
>Originator:     Janos Mohacsi
>Release:        FreeBSD 4.7-PRERELEASE i386
>Organization:
NIIF
>Environment:
System: FreeBSD norfolk.ki.iif.hu 4.7-PRERELEASE FreeBSD 4.7-PRERELEASE #2: Wed Sep 18 10:30:33 CEST 2002 root@norfolk.ki.iif.hu:/usr/src/sys/compile/NORFOLK i386

>Description:

	The mlockall and munlockall system calls are missing from FreeBSD.
	The mlockall() and munlockall() functions conform to IEEE Std
     	1003.1b-1993 (``POSIX''). FreeBSD should support these system calls.

>How-To-Repeat:
	Try to call mlockall and munlockall.	
>Fix:

	Try to import from NetBSD. If nobody taking this action until 30 
September 2002, I will submit a follow up after I have the necessary patch.



>Release-Note:
>Audit-Trail:

From: Garrett Wollman <wollman@lcs.mit.edu>
To: Janos Mohacsi <janos.mohacsi@bsd.hu>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: bin/43426: mlockall and munlockall system calls are missing from FreeBSD
Date: Fri, 27 Sep 2002 13:40:12 -0400 (EDT)

 <<On Fri, 27 Sep 2002 18:18:23 +0200 (CEST), Janos Mohacsi <mohacsi@norfolk.ki.iif.hu> said:
 
 > 	The mlockall and munlockall system calls are missing from FreeBSD.
 > 	The mlockall() and munlockall() functions conform to IEEE Std
 >      	1003.1b-1993 (``POSIX''). FreeBSD should support these system calls.
 
 FreeBSD-stable does not define _POSIX_MEMLOCK.
 FreeBSD-current defines _POSIX_MEMLOCK as -1.
 
 This indicates to applications that these features are not supported.
 
 > 	Try to import from NetBSD.
 
 FreeBSD and NetBSD have completely different virtual-memory systems.
 The functionality would have to be rewritten from scratch.  Perhaps
 you can interest one of the VM gurus.
 
 -GAWollman
 

From: Janos Mohacsi <mohacsi@niif.hu>
To: Garrett Wollman <wollman@lcs.mit.edu>
Cc: Janos Mohacsi <janos.mohacsi@bsd.hu>,
	<FreeBSD-gnats-submit@FreeBSD.ORG>
Subject: Re: bin/43426: mlockall and munlockall system calls are missing from
 FreeBSD
Date: Mon, 30 Sep 2002 19:45:24 +0200 (CEST)

 On Fri, 27 Sep 2002, Garrett Wollman wrote:
 
 > <<On Fri, 27 Sep 2002 18:18:23 +0200 (CEST), Janos Mohacsi <mohacsi@norfolk.ki.iif.hu> said:
 >
 > > 	The mlockall and munlockall system calls are missing from FreeBSD.
 > > 	The mlockall() and munlockall() functions conform to IEEE Std
 > >      	1003.1b-1993 (``POSIX''). FreeBSD should support these system calls.
 >
 > FreeBSD-stable does not define _POSIX_MEMLOCK.
 > FreeBSD-current defines _POSIX_MEMLOCK as -1.
 >
 > This indicates to applications that these features are not supported.
 >
 > > 	Try to import from NetBSD.
 >
 > FreeBSD and NetBSD have completely different virtual-memory systems.
 > The functionality would have to be rewritten from scratch.  Perhaps
 > you can interest one of the VM gurus.
 
 Yes I knew that, but I expected that mlockall() can be implemented
 with usage of mlock(), that does exist on FreeBSD.
 Unfortunately I am not an expert of the VM and I see that mlockall() on
 NetBSD is working a quite different way than mlock() on FreeBSD.
 
 What a pity!
 
 	Janos
 
 

From: Garrett Wollman <wollman@lcs.mit.edu>
To: Janos Mohacsi <mohacsi@niif.hu>
Cc: <FreeBSD-gnats-submit@FreeBSD.ORG>
Subject: Re: bin/43426: mlockall and munlockall system calls are missing from
 FreeBSD
Date: Mon, 30 Sep 2002 15:31:31 -0400 (EDT)

 <<On Mon, 30 Sep 2002 19:45:24 +0200 (CEST), Janos Mohacsi <mohacsi@niif.hu> said:
 
 > Yes I knew that, but I expected that mlockall() can be implemented
 > with usage of mlock(), that does exist on FreeBSD.
 
 Actually, it can't, for the simple reason of mlockall's MCL_FUTURE
 option, which automatically locks all future allocations in addition
 to the ones presently in use.
 
 -GAWollman
 
Responsible-Changed-From-To: freebsd-bugs->freebsd-standards 
Responsible-Changed-By: mike 
Responsible-Changed-When: Sun Nov 17 08:16:03 PST 2002 
Responsible-Changed-Why:  
Standards issue. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=43426 
Class-Changed-From-To: sw-bug->wish 
Class-Changed-By: wollman 
Class-Changed-When: Tue Nov 26 12:38:54 PST 2002 
Class-Changed-Why:  
This is not really a bug report, but rather a request for implementation 
of an optional feature.  Since no code is enclosed, mark it as a `wish'. 


Responsible-Changed-From-To: freebsd-standards->freebsd-bugs 
Responsible-Changed-By: wollman 
Responsible-Changed-When: Tue Nov 26 12:38:54 PST 2002 
Responsible-Changed-Why:  
This is not a standards issue; it's request for implementation of an 
optional feature by the VM gurus (who are probably busy working on 
lock pushdown). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=43426 
Responsible-Changed-From-To: freebsd-bugs->bms 
Responsible-Changed-By: bms 
Responsible-Changed-When: Mon 11 Aug 2003 00:19:41 PDT 
Responsible-Changed-Why:  
I have just committed mlockall()/munlockall() to HEAD. 
I have set the MFC after warning to 2 weeks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=43426 
State-Changed-From-To: open->patched 
State-Changed-By: bms 
State-Changed-When: Tue 9 Sep 2003 12:47:08 PDT 
State-Changed-Why:  
Should have marked this PR as patched already. No timeline for 
MFCing this to STABLE. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=43426 
State-Changed-From-To: patched->closed 
State-Changed-By: bms 
State-Changed-When: Sat 15 Nov 2003 00:39:40 PST 
State-Changed-Why:  
Closing this PR as it is extremely unlikely that said patches will be 
backported from the 5.x mainline; effort will be focused on building 
5-STABLE. The calls will be in 5.2-RELEASE however. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=43426 
>Unformatted:
