kupfer@ucbvax.ARPA (Mike Kupfer) (05/14/85)
The following line is from vmmeter(): deficit -= imin(deficit, imax(deficit / 10, ((klin * CLSIZE) / 2) * maxpgio / 2)); "Deficit" is used to avoid thrashing (suppose the swapper starts bringing a process in, then turns around and says "gee, I've got plenty of memory, I'll bring in another process", etc.). Vmmeter() is called once per second, and the idea seems to be to reduce "deficit" to account for the effect of page-ins. If the imax() were an imin(), I could believe that the idea is to reduce the deficit by 10% (can you say "heuristic"?), but to hedge by not reducing more than what we expect is the average number of pages that might be brought in (average page-in brings in 1/2 the maximum number of pages, and 1/2 of the paging operations are page-ins). Can anyone tell me why it's imax()? Reply by mail, please. Flames (or even snide remarks) about Berkeley code to /dev/null. Thanks. -- Mike Kupfer kupfer@ucb-arpa or kupfer@Berkeley ...!ucbvax!kupfer ``You can tell the pioneers by the arrows in their backs.''