summaryrefslogtreecommitdiff
path: root/sys/src/9/port/portfns.h
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-02-24 22:42:22 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2014-02-24 22:42:22 +0100
commit521a34d33b85e75013656b3dbb333035ed1d8a41 (patch)
treef12dc4bd2ec00443ac2ddf25a2f01cf89e92a342 /sys/src/9/port/portfns.h
parent60c3c3b3dbf4e1ae03c1a376babec80900c14ecb (diff)
kernel: keep cached pages continuous at the end of the page list on imagereclaim()
imagereclaim() sabotaged itself by breaking the invariant that cached pages are kept at the end of the page list. once we made a hole of uncached pages, we would stop reclaiming cached pages before it as the loop breaks once it hits a uncached page. (we iterate backwards from the tail to the head of the pagelist until pages have been reclaimed or we hit a uncached page). the solution is to move pages to the head of the pagelist after removing them from the image cache.
Diffstat (limited to 'sys/src/9/port/portfns.h')
-rw-r--r--sys/src/9/port/portfns.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/src/9/port/portfns.h b/sys/src/9/port/portfns.h
index 41b4b105d..96071501c 100644
--- a/sys/src/9/port/portfns.h
+++ b/sys/src/9/port/portfns.h
@@ -202,6 +202,7 @@ int okaddr(uintptr, ulong, int);
int openmode(ulong);
Block* packblock(Block*);
Block* padblock(Block*, int);
+void pageunchain(Page*);
void pagechainhead(Page*);
void pageinit(void);
ulong pagenumber(Page*);