In linux, in kvm environment, when a process in VM locks on some resource and is pre-empted, other processes of VM, which need that locked resource would spend time on spinlock. And the process would unlock the resource when it's allotted the PROCESSOR.
I would like to disable the scheduler from pre-emptying, until the process unlocks the resource. And this would reduce the cpu-time on spinlock.
How to achieve the above?? i.e.
How to findout if a process in VM has locked on some resource?
Then how to inform scheduler to not to pre-empt the process until the resource is unlocked?
correct me if am wrong anywhere..
Thanks in advance..