Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 May 2014 19:00:23 -0500 (CDT)
From:      Lawrence "The Dreamer" Chen <beastie@tardisi.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   docs/189214: mlock(2) allocation limit description inaccurate
Message-ID:  <201405020000.s4200NU6081077@zen.lhaven.homeip.net>
Resent-Message-ID: <201405020010.s420A0IM000480@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         189214
>Category:       docs
>Synopsis:       mlock(2) allocation limit description inaccurate
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 02 00:10:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Lawrence "The Dreamer" Chen
>Release:        FreeBSD 9.2-RELEASE-p5 amd64
>Organization:
>Environment:
System: FreeBSD zen.lhaven.homeip.net 9.2-RELEASE-p5 FreeBSD 9.2-RELEASE-p5 #0: Tue Apr 29 19:09:13 UTC 2014 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
	

	In mlock(2), it says:

	Since physical memory is a potentially scarce resource, processes are
	limited in how much they can lock down.  A single process can mlock()
	the minimum of a system-wide ``wired pages'' limit vm.max_wired and
	the per-process RLIMIT_MEMLOCK resource limit.

>How-To-Repeat:
	
>Fix:

	

	The more correct answer is like its the minimum of the per-process
	RLIMIT_MEMLOCK resource limt, and the difference of the system-wide
	''wired pages'' limit vm.max_wired and the total count of wired pages
	on the system vm.stat.vm.v_wire_count.

	Been trying to figure out why gnome-keyring-daemon can't lock any memory
	even though I have set "security.bsd.unprivileged_mlock=1" and
	RLIMIT_MEMLOCK default to 64 (kilobytes.)

	vm.max_wired on my system defaults to 1323555 (pages - pagesize is 4k.)

	Well, turns out vm.stat.vm.v_wire_count was 2020311....
>Release-Note:
>Audit-Trail:
>Unformatted:



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