[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] qemuDomainSendKey: Relax the qemu driver locking



On 01/24/13 11:13, Viktor Mihajlovski wrote:
On 01/24/2013 10:41 AM, Michal Privoznik wrote:
Currently, there is no reason to hold qemu driver locked
throughout whole API execution. Moreover, we can use the
new qemuDomObjFromDomain() internal API to lookup domain then.
---
  src/qemu/qemu_driver.c | 16 ++++------------
  1 file changed, 4 insertions(+), 12 deletions(-)


Formally this looks good and works on my system, so I would be fine with
it.
I am just wondering what the criteria are for holding a long-term lock
vs a short-time on. I.e. why would DomainSendKey be relaxed while
DomainInjectNMI keeps the driver lock?


That's due to historic reasons. The usual approach was to hold the driver lock all the time. We're trying to get rid of that.

qemuDomainInjectNMI can be simplified too as it doesn't mess with the driver state.

Peter


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]