From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH][RFC] Use pipe() to simulate signalfd() Date: Tue, 29 Apr 2008 21:08:29 -0300 Message-ID: <20080430000829.GA18682@dmt> References: <1209479294-22325-1-git-send-email-aliguori@us.ibm.com> <20080429223706.GA18006@dmt> <4817A46B.7000302@us.ibm.com> <20080429231313.GA18231@dmt> <4817AC2E.60909@us.ibm.com> <20080429233717.GA18425@dmt> <4817B2DD.7030100@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, Avi Kivity To: Anthony Liguori Return-path: Content-Disposition: inline In-Reply-To: <4817B2DD.7030100@us.ibm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org On Tue, Apr 29, 2008 at 06:44:29PM -0500, Anthony Liguori wrote: > Marcelo Tosatti wrote: > >Why? If you leave data in the pipe the next select() won't block. > > > >Isnt there the possibility that this loop can be stuck for significant > >amounts of time? If you're receiving lots of notifications through > >signals. > > > > If you're getting that many signals, then select() is never going to > run anyway. True. Either way, this starvation due to signals can't happen with the current scheme because signals are blocked. It seems a significant drawback. Moving the signal handling + pipe write to a separate thread should get rid of it. > No, they're independent of the patch. The symptom is that the guest > tends to hang during boot for prolonged periods of time. It tends to be > random whether it will hang at all, how long it will hang, and at what > point it will hang. It tends to hang more often in particular places. > In my ubuntu server guest, for instance, it tends to hang right after > partition probing, right after "Loading hardware drivers", and right > before spawning a getty on /dev/tty0. > > Normally, it will only hang for a few seconds. However, with -smp N > where N > number of cpus in the host, it tends to happen more > frequently. Using clock=jiffies in the guest makes the problem go away. I'll try to reproduce that, thanks. > -no-kvm-pit doesn't make a difference (the guest is normally using the > pm-timer). > > Regards, > > Anthony Liguori ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone