Hello,

while spending some days out of office, I kept thinking about your
performance issue. Could it possibly be related to the spinlock that we
use to protect the lock metadata? See [1] and [2] for the lock
implementation.

I remember when Alex first introduced the use of multiple priorities
within a single component (which was actually VirtualBox), we stumbled
over the issue that a high-priority thread would eventually keep
spinning on a contended spinlock. The spinlock holder, however, was
never scheduled anymore because it had a lower priority than the lock
applicant. Alex addressed this issue with a NOVA-specific spinlock that
maintains priority inheritance. See [3].

[1]
https://github.com/genodelabs/genode/blob/master/repos/base/include/base/cancelable_lock.h
[2]
https://github.com/genodelabs/genode/blob/master/repos/base/src/base/lock/lock.cc
[3]
https://github.com/genodelabs/genode/blob/master/repos/base-nova/src/base/lock/spin_lock.h

It would be interesting to see the spinlock-holding times of the lock's
spinlock (by taking rdtsc values when acquiring and releasing the
spinlock) in your version of VirtualBox on base-hw/Muen. One would
expect the hold times to be just the few cycles. If they are orders of
magnitudes higher, we'd need to consider a priority-inheriting spinlock
for base-hw.

Cheers
Norman

-- 
Dr.-Ing. Norman Feske
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
genode-main mailing list
genode-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/genode-main

Reply via email to