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

[Xen-devel] [PATCH] Use timeout on xenstore read_reply to avoid task hunging


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx, Chris Wright <chrisw@xxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>
  • From: Frank Pan <frankpzh@xxxxxxxxx>
  • Date: Wed, 2 Mar 2011 18:20:33 +0800
  • Cc:
  • Delivery-date: Wed, 02 Mar 2011 02:24:15 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=pNkP3rdikiaYaLs+3P/9bT2VlJZtmD6hXrzc+VcWnqzARMp8H5OFvJ7c91jBRzTHCn nNOMkrEQnJ8IEZGvs2RPV+ErvayA/H1Cs2f9oUkRd/Mj6tVPr9svPRlL8ngs8LJEiZ48 V42G66VgymoxckaPA/PZNii+qtSdi+7NEux8I=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Recent pvops kernel uses wait_event on waiting reply from xenstored.
This may cause xenstore clients hung inside kernel when xenstored does
not response correctly. The hung even happens when xenstored is not
running, and may confuse the developer.

The patch attached uses wait_event_timeout instead, and return -EIO to
userspace if xenstored does not response in 5 seconds.

Simply change wait_event to wait_event_timeout is not correct. Right
after the xenstored starts working, the requests abandoned before will
be processed by xenstored, and responses sent to the reply_list queue
will confuse the requests later. The patch also makes use of the
req_id section in struct xsd_sockmsg, as a sequence id. This avoids
the confusing of responses by abandoned requests.

Any suggestions? Thanks.

-- 
Frank Pan

Computer Science and Technology
Tsinghua University

_______________________________________________
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®.