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]Make xend to take care of dead qemu-dm process

To: shawn <xiaowei.hu@xxxxxxxxxx>
Subject: Re: [Xen-devel] [patch]Make xend to take care of dead qemu-dm process
From: "Jean Guyader" <jean.guyader@xxxxxxxxx>
Date: Thu, 17 Jul 2008 09:14:46 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Delivery-date: Thu, 17 Jul 2008 01:15:07 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=+/HCOSaV7sa7pWSLF7YP7r/2JGVBwN+SP6whbxPyO00=; b=g16GMMp3Hesgo3gZvPPB6Nv077NTw2pJyFqgzKMBmsQ/I99LswpGK1AfXirgwqfUka +vd7GI9Bv9q4JyEpdj4cI1iMeGbJIadZcHsvUnAiLX7Gc8+Xsg5pux6DzyE8yoB4hVmg A/It51J9bgQUpkv6q97Y26EOwwhAvkEg1uyis=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=KwUbug2C9GcKCgSQAkJlOhHEVujVe9/PlxxxfoM07c9Sgp/MeK6mOXYh0wBFp48FFS AYReqbHaA5cLWwxANO6KZhqLTwjk1BvE8gPL80EePK6EKamy85jJJ/NazkMScQ9OobJN vAqA5gpHp4qPyeW0IRCoXatJBrqY5LaBc8WGo=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1216281608.5245.25.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: <C46026CE.19034%keir.fraser@xxxxxxxxxxxxx> <1211788123.31313.17.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <1211966649.3303.7.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <18493.10205.299841.377360@xxxxxxxxxxxxxxxxxxxxxxxx> <1212027808.3303.10.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <1216281608.5245.25.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

On Thu, Jul 17, 2008 at 9:00 AM, shawn <xiaowei.hu@xxxxxxxxxx> wrote:
> Hi Ian,
>
> I have some question now.
> 1.For each hvm guest there will be a separate qemu-dm process created,so
> we need to track multi opened named pipes.If use blocked read,does that
> mean I have to fork a new child in xend for each hvm guest when it was
> created?

You could use a select to watch every named pipes opened in Xend.

>
> 2.If I have to fork childs in xend, Could I kill the corresponding
> domain in this child process directly?
>
> thanks
> xiaowei
>
>
> On Thu, 2008-05-29 at 10:23 +0800, shawn wrote:
>> Hi Ian,
>>
>> Thanks for your explanation:)
>> Imporving this patch
>>
>> regards,
>> xiaowei
>>
>> On Wed, 2008-05-28 at 10:37 +0100, Ian Jackson wrote:
>> > shawn writes ("Re: [Xen-devel] [patch]Make xend to take care of dead 
>> > qemu-dm process"):
>> > > Could I ask if there is any methodology mistakes to solve this problem?
>> > > or need I keep improving this patch?
>> >
>> > I made some suggestions in a recent pair of messages in the thread
>> > `c/s 17731 portability issues'.  Did you not receive those messages ?
>> > >From over here they appear to have been copied to you as the author of
>> > the errant patch.
>> >
>> > Anyway, let me repeat myself:
>> >
>> > Certainly running ps in this way is not the right way to do it.
>> >
>> > Since qemu-dm is started by xend, it is quite possible for xend to
>> > have a better and more reliable arrangement for detecting termination
>> > of the qemu-dm process.  No polling is needed (and thus failure
>> > detection can be immediate).
>> >
>> > I suggested a design involving a named pipe.  qemu-dm would be passed
>> > the writing end across exec but just keep it, and not write anything
>> > to it.  xend would keep the reading end, and when it becomes readable
>> > would collect the qemu-dm exit status with waitpid (with W_NOHANG).
>> > xend would then kill the domain and report the fact of termination and
>> > also qemu-dm's exit status if available.
>> >
>> > On restart, xend would attempt to open the fifo again with
>> > O_RDONLY|O_NONBLOCK which would fail EWOUDLBLOCK if qemu-dm was no
>> > longer running; if it was still running then termination can be
>> > detected as above, although the exit status won't be recoverable.
>> >
>> > Does this all make sense ?  I'd be happy to expand on it if you'd like
>> > to ask questions.  We'll make sure to review your next submission
>> > thoroughly.
>> >
>> > Ian.
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@xxxxxxxxxxxxxxxxxxx
>> http://lists.xensource.com/xen-devel
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>



-- 
Jean Guyader

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

<Prev in Thread] Current Thread [Next in Thread>