Subject: Re: UBC performance patch
To: None <eeh@netbsd.org>
From: Jason R Thorpe <thorpej@zembu.com>
List: tech-kern
Date: 01/26/2001 09:10:46
On Fri, Jan 26, 2001 at 04:45:28PM -0000, eeh@netbsd.org wrote:

 > Chuck, that is precisely the behavor everyone is complaining
 > about.  If you're running with a high I/O load that means you
 > are working your way through pages at a high rate.  Both the 
 > X server and X applications tend to be bursty in both CPU useage 
 > and page useage since they execute based on user input.  If
 > you're writing a document and stop to think for 20 seconds
 > YOU DO NOT WANT YOUR X SERVER AND EDITOR SWAPPED OUT, which
 > is what happens right now, even with all of the page scanner
 > fixes.  

 > Sacrificing a few dozen pages of buffer cache for an 
 > iconified in-memory netscape is precisely the trade you want
 > to make on an interactive system.  The reason you iconify a
 > program rather than terminate it so it gives up all its
 > resources is that you want it to be instantly accessible.
 > Being forced to page it all in is precisely what you don't
 > want.

Not only that, but if that Netscape is *really* idle, then its
pages won't be referenced, and thus would be a good canidate for
freeing, which will happen.

There is a problem with putting ubc pages directly on the inactive
list.  It will cause a glut of inactive pages, thus causing the
active list scan to stop prematurely (because the inactive target
is more likely to have been met).  This in turn could cause idle
pages that happen to be on the active list to not be scanned and
placed on the inactive list.

Perhaps we want a new "ubc_inactive" list, which isn't counted in the
inactive target?  And always include ubc_inactive in the inactive scan
(as opposed to including it in the object vs. swap backed toggle).

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>