summaryrefslogtreecommitdiff
path: root/sys/src/9/port/page.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-03-16 05:46:08 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2015-03-16 05:46:08 +0100
commit972cd5e3fc96059548b725ed01704ae88c55e1b4 (patch)
tree13463565d6ce75738b294308d26cd027f9c69ea3 /sys/src/9/port/page.c
parentd0b1db98bcade0335b7762cb76e236a483143f91 (diff)
kernel: get rid of auxpage() and preserve cache index bits in Page.va in mount cache
the mount cache uses Page.va to store cached range offset and limit, but mips kernel uses cache index bits from Page.va to maintain page coloring. Page.va was not initialized by auxpage(). this change removes auxpage() which was primarily used only by the mount cache and use newpage() with cache file offset page as va so we will get a page of the right color. mount cache keeps the index bits intact by only using the top and buttom PGSHIFT bits of Page.va for the range offset/limit.
Diffstat (limited to 'sys/src/9/port/page.c')
-rw-r--r--sys/src/9/port/page.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/sys/src/9/port/page.c b/sys/src/9/port/page.c
index 4945b3436..da5f41aec 100644
--- a/sys/src/9/port/page.c
+++ b/sys/src/9/port/page.c
@@ -234,26 +234,6 @@ putpage(Page *p)
freepages(p, p, 1);
}
-Page*
-auxpage(void)
-{
- Page *p;
-
- lock(&palloc);
- p = palloc.head;
- if(p == nil || palloc.freecount < swapalloc.highwater) {
- unlock(&palloc);
- return nil;
- }
- palloc.head = p->next;
- p->next = nil;
- palloc.freecount--;
- unlock(&palloc);
- p->ref = 1;
-
- return p;
-}
-
void
copypage(Page *f, Page *t)
{