git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Kernel - Planning for IOCache to use pages for cache instead of heap
[tpg/acess2.git]
/
Kernel
/
drv
/
iocache.c
diff --git
a/Kernel/drv/iocache.c
b/Kernel/drv/iocache.c
index
2b4755c
..
ba822df
100644
(file)
--- a/
Kernel/drv/iocache.c
+++ b/
Kernel/drv/iocache.c
@@
-3,6
+3,8
@@
* - IO Cache
*
* By thePowersGang (John Hodge)
* - IO Cache
*
* By thePowersGang (John Hodge)
+ *
+ * TODO: Convert to use spare physical pages instead
*/
#define DEBUG 0
#include <acess.h>
*/
#define DEBUG 0
#include <acess.h>
@@
-10,6
+12,7
@@
// === TYPES ===
typedef struct sIOCache_Ent tIOCache_Ent;
// === TYPES ===
typedef struct sIOCache_Ent tIOCache_Ent;
+typedef struct sIOCache_PageInfo tIOCache_PageInfo;
// === STRUCTURES ===
struct sIOCache_Ent
// === STRUCTURES ===
struct sIOCache_Ent
@@
-21,6
+24,15
@@
struct sIOCache_Ent
Uint8 Data[];
};
Uint8 Data[];
};
+struct sIOCache_PageInfo
+{
+ tIOCache_PageInfo *GlobalNext;
+ tIOCache_PageInfo *CacheNext;
+ tIOCache *Owner;
+ tPAddr BasePhys;
+ Uint64 BaseOffset;
+};
+
struct sIOCache
{
tIOCache *Next;
struct sIOCache
{
tIOCache *Next;
@@
-38,6
+50,7
@@
struct sIOCache
tShortSpinlock glIOCache_Caches;
tIOCache *gIOCache_Caches = NULL;
int giIOCache_NumCaches = 0;
tShortSpinlock glIOCache_Caches;
tIOCache *gIOCache_Caches = NULL;
int giIOCache_NumCaches = 0;
+tIOCache_PageInfo *gIOCache_GlobalPages;
// === CODE ===
/**
// === CODE ===
/**
UCC
git Repository :: git.ucc.asn.au