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

[Xen-devel] [PATCH] Avoid possible live-lock in vcpu_migrate


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
  • Date: Mon, 28 Feb 2011 10:23:02 +0100
  • Delivery-date: Mon, 28 Feb 2011 01:25:51 -0800
  • Domainkey-signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:X-IronPort-AV: Received:Received:Content-Type:MIME-Version:Subject: X-Mercurial-Node:Message-Id:Date:From:To; b=FHXtzAOZ/OIxcDl2j+wutWG5Abj3mY2e53ijSbcv7AdyAzP1pwLn/AxF srLjjdMfCUBP5y6eMJ7h7KPfttexJ3MdOYuqhtNCYzSodC+zbH6l6C2Hp uIqB4fEADCF3iRV54u8ybM0XlkTXpC8M6WVYd/j1QbWp6kuoh/hrSnTpF Qo2I59RG1OnwchZLvqs380ofXCW/61UCAYI7QcQkkYbdxHu4SnoJyZZl5 g5WSwMBLgSWwWWDhLSCtYXKssCtQd;
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

If vcpu_migrate is called for two vcpus active on different cpus resulting in
swapping the cpus, a live-lock could occur as both instances try to take the
scheduling lock of the physical cpus in opposite order.

To avoid this problem the locks are always taken in the same order (sorted by
the address of the lock).

Signed-off-by: juergen.gross@xxxxxxxxxxxxxx


1 file changed, 43 insertions(+), 27 deletions(-)
xen/common/schedule.c |   70 ++++++++++++++++++++++++++++++-------------------


Attachment: xen-work.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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