From patchwork Sun Feb 24 20:14:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: clownix@clownix.net X-Patchwork-Id: 222795 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 326272C02A2 for ; Mon, 25 Feb 2013 07:15:31 +1100 (EST) Received: from localhost ([::1]:56935 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9hyr-0001Hq-QJ for incoming@patchwork.ozlabs.org; Sun, 24 Feb 2013 15:15:29 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9hyY-0001Ft-2h for qemu-devel@nongnu.org; Sun, 24 Feb 2013 15:15:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9hy9-0001QY-M4 for qemu-devel@nongnu.org; Sun, 24 Feb 2013 15:15:09 -0500 Received: from gateway06.websitewelcome.com ([67.18.124.13]:51738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9hy9-0001PG-F2 for qemu-devel@nongnu.org; Sun, 24 Feb 2013 15:14:45 -0500 Received: by gateway06.websitewelcome.com (Postfix, from userid 5007) id 5B93E81A011C9; Sun, 24 Feb 2013 14:14:43 -0600 (CST) Received: from gator713.hostgator.com (gator713.hostgator.com [174.132.168.2]) by gateway06.websitewelcome.com (Postfix) with ESMTP id 4DE3D81A01195 for ; Sun, 24 Feb 2013 14:14:43 -0600 (CST) Received: from clownix by gator713.hostgator.com with local (Exim 4.80) (envelope-from ) id 1U9hy7-0004bE-5M for qemu-devel@nongnu.org; Sun, 24 Feb 2013 14:14:43 -0600 Received: from 86.67.205.232 ([86.67.205.232]) (SquirrelMail authenticated user clownix@clownix.net) by clownix.net with HTTP; Sun, 24 Feb 2013 14:14:43 -0600 Message-ID: <6389e86d0d68cc476c04c1e9b944208e.squirrel@clownix.net> Date: Sun, 24 Feb 2013 14:14:43 -0600 From: clownix@clownix.net To: "qemu mailing" User-Agent: SquirrelMail/1.4.22 MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator713.hostgator.com X-AntiAbuse: Original Domain - nongnu.org X-AntiAbuse: Originator/Caller UID/GID - [568 32003] / [47 12] X-AntiAbuse: Sender Address Domain - clownix.net X-BWhitelist: no X-Source: X-Source-Args: /var/cpanel/3rdparty/bin/php /usr/local/cpanel/base/3rdparty/squirrelmail/src/compose.php X-Source-Dir: :/base/3rdparty/squirrelmail/src X-Source-Sender: X-Source-Auth: clownix X-Email-Count: 1 X-Source-Cap: Y2xvd25peDtjbG93bml4O2dhdG9yNzEzLmhvc3RnYXRvci5jb20= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 67.18.124.13 Subject: [Qemu-devel] [Fwd: qemu tx stop in cloonix] X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Hello, I use qemu inside a gplv3 software called cloonix, I have patched qemu to have unix sockets instead of inet ones but the bug I have with unix sockets may also happen with inet ones. The bug can be reproduced in cloonix context by using iperf, it occurs randomly in a virtual cloonix network but occurs within seconds using iperf in nested virtualisation (cloonix inside cloonix), the problem begins when a lot of packets must be transmitted and the socket (inet in the classical qemu, unix in cloonix) gets full and qemu_net_queue_append_iov is called, then tx never restarts. See under in the patch attached, the way I avoided queuing anything, it works, even if it is not a correction to the bug... The patch is for version 21.3 of cloonix which uses qemu-1.4.0-rc1, but I now use qemu-1.4.0 and the bug is still there. Regards Vincent Perrier ---------------------------- Original Message ---------------------------- Subject: qemu tx stop in cloonix From: clownix@clownix.net Date: Sun, February 24, 2013 9:14 am To: "list" -------------------------------------------------------------------------- There is a bug visible more particularly when doing nested cloonix and iperf inside the second level nested machines. The ethernet interface emitting a big load stops working, this has been corrected in my version but I will not deliver the correction outside the regular deliveries (every 2 or 3 months). If you have a stopping of your ethernet access after a burst of traffic, here is the cause: From the kernel virtio_net driver inside the guest, piles of messages are sent into a virtio queue to the qemu user process. The qemu user process does what it can to give the messages to a unix socket (to cloonix). When too much traffic arrives, the unix socket writes 0 bytes as it gets full. Then qemu, instead of droping packet (too much is too much, no need to try harder) qemu does not want to drop, it tries to enqueue packets until the unix socket clears... The mechanics of this unusual case management is too complex, I did not get into it to repair it, I just dropped the packets, simplest solution, and the above layers know low level packets can just disapear... Here is the solution: in "sources/Cloonix-Net-Lab/qemu", in file cmd, add the following qemu_drop_burst.patch line after having put the qemu_drop_burst.patch in the qemu directory. patch -p1 < ../cloonix_qemu.patch patch -p1 < ../qemu_drop_burst.patch The qemu_drop_burst.patch should be with this mail... diff -Naur qemu-1.4.0-rc1/net/net.c new_qemu-1.4.0-rc1/net/net.c --- qemu-1.4.0-rc1/net/net.c 2013-02-07 01:40:56.000000000 +0100 +++ new_qemu-1.4.0-rc1/net/net.c 2013-02-24 16:03:45.139853349 +0100 @@ -388,10 +388,14 @@ } if (sender->peer->receive_disabled) { - return 0; +//cloonix DROP +// return 0; + return 1; } else if (sender->peer->info->can_receive && !sender->peer->info->can_receive(sender->peer)) { - return 0; +//cloonix DROP +// return 0; + return 1; } return 1; }