From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0ezs-0004uJ-7x for qemu-devel@nongnu.org; Wed, 21 Oct 2009 13:29:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0ezn-0004nc-KE for qemu-devel@nongnu.org; Wed, 21 Oct 2009 13:29:15 -0400 Received: from [199.232.76.173] (port=59409 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0ezn-0004nR-9a for qemu-devel@nongnu.org; Wed, 21 Oct 2009 13:29:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25952) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N0ezm-00060w-Mr for qemu-devel@nongnu.org; Wed, 21 Oct 2009 13:29:11 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9LHT9RJ021905 for ; Wed, 21 Oct 2009 13:29:09 -0400 Message-ID: <4ADF44D6.5040207@redhat.com> Date: Wed, 21 Oct 2009 19:28:54 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20091008203740.GA20727@redhat.com> <1256063981.27918.6.camel@blaa> <4ADE0809.2050500@redhat.com> <20091021154234.GA24913@redhat.com> In-Reply-To: <20091021154234.GA24913@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: "Michael S. Tsirkin" Cc: Mark McLoughlin , qemu-devel@nongnu.org > 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. Cheers, Paolo