From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0f7w-0007U8-Ka for qemu-devel@nongnu.org; Wed, 21 Oct 2009 13:37:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0f7s-0007O3-Q7 for qemu-devel@nongnu.org; Wed, 21 Oct 2009 13:37:36 -0400 Received: from [199.232.76.173] (port=58588 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0f7s-0007Nl-IC for qemu-devel@nongnu.org; Wed, 21 Oct 2009 13:37:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22611) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N0f7s-0007k0-0x for qemu-devel@nongnu.org; Wed, 21 Oct 2009 13:37:32 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9LHbVCZ027281 for ; Wed, 21 Oct 2009 13:37:31 -0400 Date: Wed, 21 Oct 2009 19:35:16 +0200 From: "Michael S. Tsirkin" Message-ID: <20091021173516.GA25112@redhat.com> References: <20091008203740.GA20727@redhat.com> <1256063981.27918.6.camel@blaa> <4ADE0809.2050500@redhat.com> <20091021154234.GA24913@redhat.com> <4ADF44D6.5040207@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ADF44D6.5040207@redhat.com> Subject: [Qemu-devel] Re: [PATCH] qemu: work around for "posix-aio-compat" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Mark McLoughlin , qemu-devel@nongnu.org On Wed, Oct 21, 2009 at 07:28:54PM +0200, Paolo Bonzini wrote: >> I've uploaded them here: >> http://www.kernel.org/pub/linux/kernel/people/mst/ >> you can't see them in mirrors yet but will be able to soon when >> kernel.org mirroring system catches them. > > There is no difference in optimizations except that here: > > for (i = 0; i < aiocb->aio_niov && count; ++i) { > > one of the two versions actually does "count && i < aiocb->aio_niov" due > to hashing vagaries. This is irrelevant anyway. Same inlining, same > loop optimization decisions, same everything else. So a GCC bug can be > ruled out, IMHO. > > The only difference, as someone already suspected, is the padding---the > sigset is placed between the top of the frame and the other variables, > which may hide an overrun. This is quite amazing for a function that > has no arrays, but still is the only evidence. > > I suggest trying to make the sigset_t static, since that generates > exactly the same code as the "nohang" case, and exactly the same stack > layout as the "hang" case. The next obvious step would be placing a > watchpoint somewhere. Yes, but where? > Cheers, > > Paolo