qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH,RFC]: Generic memory callback regions


From: Gianni Tedesco
Subject: Re: [Qemu-devel] [PATCH,RFC]: Generic memory callback regions
Date: Tue, 01 Jun 2004 12:26:43 +0100

On Tue, 2004-06-01 at 06:13 -0500, Joe Batt wrote:
> I haven't read your patch, but I recently wrote a SH2 emulator.  We
> found that a lot of time was spent finding the right callbacks, so for
> the device memory, we used a sorted array.  After each access, we
> bubbled that memory region closed to the beginning of the array.  This
> turned out to be faster than the tree that we were using.  The main
> differences are we have 100+ regions and implemented it in Java.

Good call. Move-to-front heuristic seems smart because I anticipate (and
you found out for real) that memory accesses will have temporal
locality. Moving to head is theoretically the same or a little better
than 'bubbling up' actually, Knuth covers it in Vol 3 as i recall.

Well, it becomes irrelevent for this case now, as I am implementing this
privately in pciproxy.c, rather than publically in exec.c, and in my
case the list is always 1 item long :)

-- 
// Gianni Tedesco (gianni at scaramanga dot co dot uk)
lynx --source www.scaramanga.co.uk/scaramanga.asc | gpg --import
8646BE7D: 6D9F 2287 870E A2C9 8F60 3A3C 91B5 7669 8646 BE7D

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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