Thread (27 messages) 27 messages, 6 authors, 2011-09-27

Re: [PATCH 6/8] kstaled: rate limit pages scanned per second.

From: Michel Lespinasse <hidden>
Date: 2011-09-23 10:18:22
Also in: lkml

On Thu, Sep 22, 2011 at 4:15 PM, Andrew Morton [off-list ref] wrote:
On Fri, 16 Sep 2011 20:39:11 -0700
Michel Lespinasse [off-list ref] wrote:
quoted
Scan some number of pages from each node every second, instead of trying to
scan the entime memory at once and being idle for the rest of the configured
interval.
Well...  why?  The amount of work done per scan interval is the same
(actually, it will be slightly increased due to cache evictions).

I think we should see a good explanation of what observed problem this
hackery^Wtweak is trying to solve.  Once that is revealed, we can
compare the proposed solution with one based on thread policy/priority
(for example).
There are two aspects to this:

- some people might find it nicer to have a small amount of load
during the entire scan interval, rather than some spike when we
trigger the scanning and some idle time afterwards. That part is
highly debatable and there are probably better ways to achieve this.

- jitter reduction - if we were to scan the entire memory at once
without sleeping, the pages that are scanned first would have a fairly
constant interval between times they are looked at; however if the
time to scan pages is not constant (it could vary depending on CPU
load and pages getting allocated and freed) the pages that are scanned
towards the end of each scan would have a bit more jitter. This effect
is reduced by trying to scan a fixed number of pages per second.
This is all rather unpleasing.
Yeah, this is not my favourite patch in the series :/

Would it help if I reordered it last in the series, as it seems more
controversial & the later ones don't functionally depend on it ?

-- 
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.

--
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-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help