Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Sep 1998 20:02:26 -0700
From:      Mike Smith <mike@smith.net.au>
To:        zhihuizhang <bf20761@binghamton.edu>
Cc:        hackers <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: Question about wiring a page 
Message-ID:  <199809210302.UAA02670@word.smith.net.au>
In-Reply-To: Your message of "Sat, 19 Sep 1998 16:06:39 EDT." <Pine.SOL.L3.93.980919155823.25658A-100000@bingsun2> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> I read in vm_map_lookup() the following comment:
> 
> /*
>  * If this page is not pageable, we have to get it for all possible
>  * accesses.
>  */
> 
> Does this mean that even if the map entry is specified as wired, the pages
> in its range still have to be faulted in for the very first time?

Unless it's prefaulted, even a wired page has to be faulted once to 
obtain a backing page.

> Another question: Can any process wire a page at its own will? There must
> be some regulations, otherwise anyone can hog the memory.

See the mlock(2) manpage for details on this.  There's a per-user 
resource limit (memorylocked) which governs the per-user limit, however 
I seem to recall that only root can actually lock memory in core.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



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