Skip to content

Conversation

@ravippandey
Copy link
Contributor

...started

There is a race condition between vm_start and monitor thread.
The monitor thread runs every 5s and updates the memory changes of the
VMs if any. It does that only if the VM's resident_on value is set to
localhost.
Currently, the memory changes are being seen by monitor thread while
VM is starting but since the start operation has'nt yet set the
resident_on, the monitor thread doesn't do anything.
However, the in-memory cache of monitor thread already has the vm_memory
changes for that VM. This needs to be removed, so that monitor thread
updates it next time when the resident_on value of the VM is set by
start operation.
Signed-off-by: Ravi Pandey [email protected]

…is started

There is a race condition between vm_start and monitor thread.
The monitor thread runs every 5s and updates the memory changes of the
VMs if any. It does that only if the VM's resident_on value is set to
localhost.
Currently, the memory changes are being seen by monitor thread while
VM is starting but since the start operation has'nt yet set the
resident_on, the monitor thread doesn't do anything.
However, the in-memory cache of monitor thread already has the vm_memory
changes for that VM. This needs to be removed, so that monitor thread
updates it next time when the resident_on value of the VM is set by
start operation.
Signed-off-by: Ravi Pandey <[email protected]>
@xen-git
Copy link
Contributor

xen-git commented Dec 11, 2013

Can one of the admins verify this patch for testing?

@jonludlam
Copy link
Contributor

@xen-git ok to test

@jonludlam
Copy link
Contributor

Looks good to me.

jonludlam pushed a commit that referenced this pull request Mar 4, 2014
CA-122467: Fix for setting the right value of memory_actual after vm is ...
@jonludlam jonludlam merged commit a015bd0 into xapi-project:master Mar 4, 2014
@zli zli mentioned this pull request Mar 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants