Hello
From the http://lkml.indiana.edu/hypermail/linux/kernel/0103.1/0030.html I learn about a new type of mutexes in linux, an adaptive_np one:
The PTHRED_MUTEX_ADAPTIVE_NP is a new mutex that is intended for high throughput at the sacrifice of fairness and even CPU cycles. This mutex does not transfer ownership to a waiting thread, but rather allows for competition. Also, over an SMP kernel, the lock operation uses spinning to retry the lock to avoid the cost of immediate descheduling.
There is mentioned "Cost of immediate descheduling". How much is this cost? (In terms of cpu ticks; TLB, TSS, smth else reloading) What is done in kernel between an "immediate descheduling request" and rescheduling back to the run state again?
How can I do a explicit descheduling and how can I measure its cost?