|Priority:||4 - Normal|
|Created by:||John Levon [X]|
|Reported by:||John Levon [X]|
|Assigned to:||John Levon [X]|
Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2018-03-29T20:26:49.268Z)
2018-04-12 Promised Land (Release Date: 2018-04-12)
This routine begins with:
if (vcpu->hostcpu == curcpu) return;
Unfortunately I missed during code review that this check is always false: here,
NOCPU in such a case.
This means we will be calling
cyclic_move_here a bunch of times - and taking
cpu_lock. However, we typically won't actually be juggling, as the cyclic will already have moved. So the impact here is essentially unnecessary contention on
To fix, we will track the last CPU we were
VCPU_RUNNING on with
->lasthostcpu, and use that.
To test the fix, I ran a DTrace script to verify that xc traffic wasn't related to the cyclics (i.e. they have been correctly moved still), and we're not needlessly calling into
cyclic_move_here() (i.e. this bug has been fixed).
OS-6848 vm_localize_resources() CPU check is wrong
Reviewed by: Jerry Jelinek <firstname.lastname@example.org>
Reviewed by: Patrick Mooney <email@example.com>
Approved by: Patrick Mooney <firstname.lastname@example.org>