summaryrefslogtreecommitdiff
path: root/sys/src/9/port/portdat.h
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-02-07 02:52:23 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2015-02-07 02:52:23 +0100
commitb8cf3cb879a19c001796329ebe266104d13e63be (patch)
tree745534899e603d5336347c846ad286c3535c43fc /sys/src/9/port/portdat.h
parentf215b660b30cc5e5d318922f545441b4ac14b200 (diff)
kernel: reduce Page structure size by changing Page.cachectl[]
there are no kernels currently that do page coloring, so the only use of cachectl[] is flushing the icache (on arm and ppc). on pc64, cachectl consumes 32 bytes in each page resulting in over 200 megabytes of overhead for 32gb of ram with 4K pages. this change removes cachectl[] and adds txtflush ulong that is set to ~0 by pio() to instruct putmmu() to flush the icache.
Diffstat (limited to 'sys/src/9/port/portdat.h')
-rw-r--r--sys/src/9/port/portdat.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/src/9/port/portdat.h b/sys/src/9/port/portdat.h
index af33ea8a1..96e823766 100644
--- a/sys/src/9/port/portdat.h
+++ b/sys/src/9/port/portdat.h
@@ -292,11 +292,6 @@ struct Note
enum
{
- PG_NOFLUSH = 0,
- PG_TXTFLUSH = 1, /* flush dcache and invalidate icache */
- PG_DATFLUSH = 2, /* flush both i & d caches (UNUSED) */
- PG_NEWCOL = 3, /* page has been recolored */
-
PG_MOD = 0x01, /* software modified bit */
PG_REF = 0x02, /* software referenced bit */
};
@@ -309,10 +304,10 @@ struct Page
uintptr va; /* Virtual address for user */
uintptr daddr; /* Disc address on swap */
Image *image; /* Associated text or swap image */
+ ulong txtflush; /* Flush icache for putmmu */
ushort refage; /* Swap reference age */
char modref; /* Simulated modify/reference bits */
char color; /* Cache coloring */
- char cachectl[MAXMACH]; /* Cache flushing control for putmmu */
};
struct Swapalloc