|
From: | alvise rigo |
Subject: | Re: [Qemu-devel] [RFC v5 1/6] exec.c: Add new exclusive bitmap to ram_list |
Date: | Mon, 28 Sep 2015 09:28:55 +0200 |
On 09/24/2015 01:32 AM, Alvise Rigo wrote:
> + if (cpu == smp_cpus) {
> + if (smp_cpus >= EXCL_BITMAP_CELL_SZ) {
> + return bitmap[EXCL_BITMAP_GET_BYTE_OFFSET(addr)];
> + } else {
> + return bitmap[EXCL_BITMAP_GET_BYTE_OFFSET(addr)] &
> + ((1 << smp_cpus) - 1);
> + }
> + } else {
> + return bitmap[EXCL_BITMAP_GET_BYTE_OFFSET(addr)] & (1 << EXCL_IDX(cpu));
> + }
How can more than one cpu have the same address exclusively?
Isn't this scheme giving a whole page to a cpu, not a cacheline?
That's going to cause ll/sc conflicts where real hardware wouldn't.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |