changelog shortlog tags branches changeset files revisions annotate raw help

Mercurial > hg > plan9front / rc/bin/"

changeset 4350: 1f9d7811d546
parent: be0f62768273
author: cinap_lenrek@felloff.net
date: Mon, 16 Mar 2015 05:46:08 +0100
permissions: -rwxr-xr-x
description: 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.
1 #!/bin/rc
2 
3 rfork en
4 
5 if(test -r /mnt/acme/acme/body)
6  bind /mnt/acme/acme/body /dev/text
7 
8 PROMPT='[^ ]*(%|;)[ ]+'
9 
10 fn cmds {
11  grep '^'$PROMPT'[^"]' /dev/text | sed 's/^/ /'
12 }
13 
14 switch($#*) {
15 case 0
16  cmds | tail -1
17 case *
18  cmds | grep '^ '$PROMPT^$"* | {echo; cat} |
19  pr -t -n | sort -nr | sort -u +1 | sort -n |
20  sed 's/^ *[0-9]+ //' | grep .
21 }
22 
23 # the silly {echo; cat} gets around pr printing "empty file" when
24 # presented with no input.
25