Subject: Re: CVS commit: syssrc/sys/arch/arm/arm32
To: Richard Earnshaw <>
From: Jason R Thorpe <>
List: tech-kern
Date: 10/18/2001 10:15:14
On Thu, Oct 18, 2001 at 07:50:31PM +0300, Richard Earnshaw wrote:

 > However, even with this step having more than a small number of
 > processes searching for a L1 pt can still be enough to bring the system
 > down, since they all run at high priority and sleep for very little time,
 > thus blocking out user code from completing.  So implement an exponential
 > backoff when waiting for a page table, so that we don't hog the CPU when
 > memory is scarce.

This is a good improvement, but...

The pmap isn't really supposed to be sleeping -- there could be locks
held by the caller (UVM).  The fact that other pmaps currently sleep
is not meant to suggest that such behavior is correct :-) I should
probably clarify this in the pmap(9) manual page.

The right thing to do is to return an error to the caller of pmap_enter()
if PMAP_CANFAIL is set in the flags argument.  The caller will then unlock
and wait for more memory.

        -- Jason R. Thorpe <>