* [RFC] pre-cleaning
@ 2000-06-05 1:22 Ed Tomlinson
0 siblings, 0 replies; only message in thread
From: Ed Tomlinson @ 2000-06-05 1:22 UTC (permalink / raw)
To: linux-mm
Hi,
Was chating with Rik on #kernelnewbies and cameup with the following idea:
Assuming we have changes things to look a bit more like bsd and are scanning
the mm array looking for pages to free. Once we have our quota of free pages
we save a pointer to the last scanned page (freed_to). Then we continue
scanning for N entries writing out dirty pages (can we cluster these writes?)
we save a pointer to the last precleaned page in (cleaned_to) and record
the number of precleaned pages in (pre_clean). Next scan time the
idea is most of the precleaned pages will still be clean. We check this
by recording the number of pages we have to reclean in (re_clean). We set
things up so N entires should free about the same number of pages as the last
called required us to free. We can use the re_clean/pre_clean ratio to
decide if we are doing any good, if not we reduce the number of pages we
preclean... If everything is ok a normal scan should compelete, having freed
enought pages, when freed_to = the old cleaned_to.
Thoughts it might be better to create an array for a stucture with three
counters in it
precleaned - number of pages precleaned in this segement
recleaned - number of pages relceaned (want this near zero)
cleaned - number of pages we had to clean during freeing (not recleaned)
say i is the index in the mm array and j = i/2^k,
where j indexes the above stucture
we use the sum of [(freed_to/2^k)-x, (freed_to/2^k)-1] numbers to autotune
the preclean logic
if recleaned*100 div precleaned > threshold1 then n =/ 2
else if cleaned*100 div precleaned > threshold2 then N =* 2
--
Ed Tomlinson (ontadata) <tomlins@cam.org>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-06-05 11:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-05 1:22 [RFC] pre-cleaning Ed Tomlinson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox