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

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


  • To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
  • From: Frank Pan <frankpzh@xxxxxxxxx>
  • Date: Wed, 2 Mar 2011 19:35:20 +0800
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jeremy Fitzhardinge <Jeremy.Fitzhardinge@xxxxxxxxxx>
  • Delivery-date: Wed, 02 Mar 2011 03:39:01 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=UrDvgYAvnVk12oHCywl5q7ucvX0tMx76hoj85BevQ0ihUVDaNVZsGHRMwh7diLXWYr Ku80kruss9X9svpy6cPeHV5Z4iPLM9+MMGXn75dpJQryntrs6I8rBYvwKxXcuGtK2a+c csZXR9bgFHhguiU0RMgS8kRWZwnGW6hKtCHT4=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Oh sorry.
Patch attached.

On Wed, Mar 2, 2011 at 6:34 PM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
> It all sounds very plausible to me but you've forgotten the patch ;-)
>
> Why wait_event_timeout and not wait_event_interruptible to allow users
> to interrupt? In particular I'm concerned about the arbitrarily chosen
> 5s timeout not being sufficient on a busy system.

FP: I wait_event_interruptible is a choice. But it needs user
operation such as kill command. User-level tool(xenstore-ls for
example) can also set SIGALRM or something else, but it sounds not so
good.

The timeout parameter is something discussible. 5s may not be a good
one, but I believe xenstored on a healthy system should be response in
5s. What do you think?

> Once specific pitfall which I remember was that userspace clients are at
> liberty to make use of the req_id themselves (and some do). Fixing this
> might involve shadowing the user provided req_id with a kernel generated
> ID on the ring and unshadowing in the responses...

FP: Yes, that's what I supposed to do. But I cannot find any
dereference on the req_id section of the reply msg. If it exist
somewhere, shadowing is surely needed.

-- 
Frank Pan

Computer Science and Technology
Tsinghua University

Attachment: 0001-Use-timeout-on-xenstore-read_reply-to-avoid-task-hun.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®.