|
From: | Richard Henderson |
Subject: | Re: [Qemu-devel] [RFC v5 1/6] exec.c: Add new exclusive bitmap to ram_list |
Date: | Sat, 26 Sep 2015 10:15:20 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
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] |