Re:A tale of an impossible bug: big.LITTLE and caching
by cm2187 on Monday September 12, 2016 @02:04PM
(#12482073)
Stupid question but does that work in a virtualised environment where your program can be live-migrated to another physical machine with a different CPU?
[ Parent
| on HN ]
Re:A tale of an impossible bug: big.LITTLE and caching
by tcas on Monday September 12, 2016 @02:09PM
(#12482133)
I believe virtual machines will typically alter the CPUID a bit:
https://tech.mendix.com/linux/2016/08/18/xen-cpuid-masking/
You'll choose a lowest common denominator of features sets.
Re:A tale of an impossible bug: big.LITTLE and caching
by Someone on Monday September 12, 2016 @02:39PM
(#12482444)
As others said, one typically pretends to run a fixed CPU on all CPUs.
Also, for this specific case, I doubt migration will keep around the contents of the cache lines and their 'dirty' bits (corollary: it will be possible to reliably detect a move, if one is willing to continuously run code that detects cache-line timing differences)
Re:A tale of an impossible bug: big.LITTLE and caching
by mjg59 on Monday September 12, 2016 @02:06PM
(#12482095)
Nope. There's not really any alternative other than "Don't do that", or limit migration to machines that have a superset of the instructions on the original machine.
Re:A tale of an impossible bug: big.LITTLE and caching
by pm215 on Monday September 12, 2016 @02:12PM
(#12482156)
Usually you configure the VM to only report CPUID values corresponding to lowest-common-denominator features on everything you might want to migrate to. Then as long as the guest code plays nicely and looks at the CPUID feature flags to see what it can use, it'll migrate happily. QEMU has support for this, for instance.