[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: Release of COREMU, a scalable and portable full-system
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] Re: Release of COREMU, a scalable and portable full-system emulator |
Date: |
Sun, 25 Jul 2010 17:56:16 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Thunderbird/3.0.5 |
On 07/23/2010 01:02 PM, Stefan Hajnoczi wrote:
>> In fact, we solve this problem through a really simple method.
>> In our prototype, we removed this piece of code like this:
>> void *qemu_get_ram_ptr(ram_addr_t addr)
>> {
>> ......
>>
>> /* Move this entry to to start of the list. */
>> #ifndef CONFIG_COREMU
>> /* Different core can access this function at the same time.
>> * For coremu, disable this optimization to avoid data race.
>> * XXX or use spin lock here if performance impact is big. */
>> if (prev) {
>> prev->next = block->next;
>> block->next = *prevp;
>> *prevp = block;
>> }
>> #endif
>> return block->host + (addr - block->offset);
>> }
>>
>> CONFIG_COREMU is defined when TCG parallel mode is configured.
>> And the list is more likely to be read only without hotplug device, so
>> we don't use a lock to protect it.
>> Reimplement this list with a lock free list is also reasonable, but
>> seems unnecessary. :-)
>
> Ah, good :).
For this one in particular, you could just use circular lists (without a
"head" node, unlike the Linux kernel's list data type, as there's always
a RAM entry) and start iteration at "prev".
Paolo
- [Qemu-devel] Re: Release of COREMU, a scalable and portable full-system emulator, (continued)
- [Qemu-devel] Re: Release of COREMU, a scalable and portable full-system emulator, Stefan Hajnoczi, 2010/07/22
- Re: [Qemu-devel] Re: Release of COREMU, a scalable and portable full-system emulator, wang Tiger, 2010/07/22
- Re: [Qemu-devel] Re: Release of COREMU, a scalable and portable full-system emulator, Stefan Hajnoczi, 2010/07/22
- Re: [Qemu-devel] Re: Release of COREMU, a scalable and portable full-system emulator, wang Tiger, 2010/07/22
- [Qemu-devel] Re: Release of COREMU, a scalable and portable full-system emulator, Jan Kiszka, 2010/07/23
- Re: [Qemu-devel] Re: Release of COREMU, a scalable and portable full-system emulator, Alexander Graf, 2010/07/23
- Re: [Qemu-devel] Re: Release of COREMU, a scalable and portable full-system emulator, Stefan Hajnoczi, 2010/07/23
- Re: [Qemu-devel] Re: Release of COREMU, a scalable and portable full-system emulator, Jan Kiszka, 2010/07/23
- Re: [Qemu-devel] Re: Release of COREMU, a scalable and portable full-system emulator, wang Tiger, 2010/07/23
- Re: [Qemu-devel] Re: Release of COREMU, a scalable and portable full-system emulator, Stefan Hajnoczi, 2010/07/23
- [Qemu-devel] Re: Release of COREMU, a scalable and portable full-system emulator,
Paolo Bonzini <=
- [Qemu-devel] Re: Release of COREMU, a scalable and portable full-system emulator, wang Tiger, 2010/07/23