From: Ed Tomlinson <tomlins@cam.org>
To: linux-mm@kvack.org
Subject: [RFC] pre-cleaning
Date: Sun, 4 Jun 2000 21:22:21 -0400 [thread overview]
Message-ID: <00060422052200.12375@oscar> (raw)
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/
reply other threads:[~2000-06-05 11:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00060422052200.12375@oscar \
--to=tomlins@cam.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox