WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Use timeout on xenstore read_reply to avoid task hunging
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
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=Nv0qNRY2xZHwX5Ur0N4xNRKQDGDr5WX0rNXxwg/k7DM=; b=amnFxWyBKYaUNBJzXZix+nwGtc0CCCmjMmK8c8bkEmQjVDNa+YKYhCdNyn61lLGLOf mrjBwxFiuPBOKnJVtLmOBYamghIiWjmdxxenNjcPv/y3PM4PwzeEF7XOLSAem/pEGBlt 1c+1F69k83q/HWCmoJs6Tdo8z5XZ21sm5URS8=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1299062062.17907.1442.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <AANLkTimsaSKxCxRqBkpgVs30_jgdHrgw2ibFsU_gKCo6@xxxxxxxxxxxxxx> <1299062062.17907.1442.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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