qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v9 01/10] Add cache handling functions


From: Amos Kong
Subject: Re: [Qemu-devel] [PATCH v9 01/10] Add cache handling functions
Date: Fri, 20 Apr 2012 06:48:32 +0800

On Thu, Apr 12, 2012 at 2:49 AM, Orit Wasserman <address@hidden> wrote:
Add LRU page cache mechanism.
The page are accessed by their address.

Signed-off-by: Orit Wasserman <address@hidden>
Signed-off-by: Benoit Hudzia <address@hidden>
Signed-off-by: Petter Svard <address@hidden>
Signed-off-by: Aidan Shribman <address@hidden>
---
 arch_init.c |  220 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 220 insertions(+), 0 deletions(-)

diff --git a/arch_init.c b/arch_init.c
index 595badf..2e534f1 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -28,6 +28,7 @@
 #include <sys/types.h>
 #include <sys/mman.h>
 #endif
+#include <assert.h>
 #include "config.h"
 #include "monitor.h"
 #include "sysemu.h"
@@ -44,6 +45,14 @@
 #include "exec-memory.h"
 #include "hw/pcspk.h"

+#ifdef DEBUG_ARCH_INIT
+#define DPRINTF(fmt, ...) \
+    do { fprintf(stdout, "arch_init: " fmt, ## __VA_ARGS__); } while (0)
+#else
+#define DPRINTF(fmt, ...) \
+    do { } while (0)
+#endif
+
 #ifdef TARGET_SPARC
 int graphic_width = 1024;
 int graphic_height = 768;
@@ -127,6 +136,217 @@ static int is_dup_page(uint8_t *page)
    return 1;
 }

+/***********************************************************/
+/* Page cache for storing previous pages as basis for XBZRLE compression */
+#define CACHE_N_WAY 2 /* 2-way assossiative cache */

typo, %s/assossiative/associative/

...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]