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 20:13:13 -0300 Message-ID: <20080429231313.GA18231@dmt> References: <1209479294-22325-1-git-send-email-aliguori@us.ibm.com> <20080429223706.GA18006@dmt> <4817A46B.7000302@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: <4817A46B.7000302@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 05:42:51PM -0500, Anthony Liguori wrote: > Marcelo Tosatti wrote: > >Hi Anthony, > > > >How is -no-kvm-irqchip working with the patch? > > > > Seems to work fine. What is your expectation? Just wondering if vcpu's are being properly awake. > >Make sure the IO thread has SIG_IPI blocked (those are for APIC vcpu > >initialization only). > > > > Just so I'm clear, there's really no harm in not blocking SIG_IPI > because it would just be ignored by the IO thread (since the SIG_IPI > handler is a nop). But yeah, we should explicitly block it. Problem is if the IO thread _receives_ SIGIPI instead of some vcpu thread. So there is potential harm in not blocking it. > >What is the reason for this loop instead of a straight read? > > > >Its alright to be interrupted by a signal. > > > > Just general habit with QEMU. Please don't :-) > >>- kvm_eat_signal(&io_signal_table, NULL, 1000); > >> pthread_mutex_lock(&qemu_mutex); > >>- cpu_single_env = NULL; > >>- main_loop_wait(0); > >>+ main_loop_wait(10); > >> > > > >Increase that 1000 or something. Will make it easier to spot bugs. > > > > I have actually and it does introduce some bugs. I'm not entirely clear > what is causing them though. Should indicate that some event previously delivered through signals and received by sigtimedwait is not waking up the IO thread. ------------------------------------------------------------------------- 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