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

[Xen-devel] yield hypercall to prevent lock holder problem ?



Hi, all:

Does anyone know how does the yield function works in the Xen scheduler? Right now only credit scheduler uses it to put it behind one lower-priority runnable vcpus. But what is this used for?Â

I checked [1], the author also mentioned the yield function to prevent lhp. Is this the same function?

On Xen part, the yield function is called in do_yield(), which is called in do_sched_op(), by passing in SCHEDOP_YIELD.

However, if you grep the whole Linux Kernel Code, (3.8.0 in my case), the place where SCHEDOP_YIELD appears are:
1) drivers\tty\hvc\hvc_xen.c, domU_write_console()
2) arch\x86\xen\smp.c, xen_cpu_up()
3) arch\x86\xen\smp.c, xen_smp_send_call_function_ipi()
4) arch\ia64\xen\xcom_hcall.c, xencomm_hypercall_sched_op()

None of this seems related to the spinlock.


I also checked the file:
arch\x86\xen\spinlock.c, it has:
static unsigned lock_timeout = 1 << 10;
#define TIMEOUT lock_timeout.
Is this the timeout value talked in [1] to prevent the lhp?


If the yield function is used to prevent lhp, how does it connect with the spinlock?Â

I am relatively new to this lhp problem and any help would be appreciated.

Thanks very much!

Sisu


[1] "Thomas Friebel:ÂPreventing Guests from Spinning Around" in Xen Summit 2008




--
Sisu Xi, PhD Candidate

http://www.cse.wustl.edu/~xis/
Department of Computer Science and Engineering
Campus Box 1045
Washington University in St. Louis
One Brookings Drive
St. Louis, MO 63130
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.