From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUXzI-0003n7-6b for qemu-devel@nongnu.org; Tue, 02 Aug 2016 07:35:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUXzD-0003Qq-U9 for qemu-devel@nongnu.org; Tue, 02 Aug 2016 07:35:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36854) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUXzD-0003Qk-OI for qemu-devel@nongnu.org; Tue, 02 Aug 2016 07:35:51 -0400 Message-ID: <1470137749.30562.91.camel@redhat.com> From: Gerd Hoffmann Date: Tue, 02 Aug 2016 13:35:49 +0200 In-Reply-To: <1469638520-32706-1-git-send-email-den@openvz.org> References: <1469638520-32706-1-git-send-email-den@openvz.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/1] ehci: faster frame index calculation for skipped frames List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" Cc: qemu-devel@nongnu.org, Evgeny Yakovlev On Mi, 2016-07-27 at 19:55 +0300, Denis V. Lunev wrote: > ehci_update_frindex takes time linearly proportional to a number > of uframes to calculate new frame index and raise FLR interrupts, > which is a problem for large amounts of uframes. >=20 > If we experience large delays between echi timer callbacks (i.e. > because > other periodic handlers have taken a lot of time to complete) we > get a lot of skipped frames which then delay ehci timer callback more > and this leads to deadlocking the system when ehci schedules next > callback to be too soon. >=20 > Observable behaviour is qemu consuming 100% host CPU time while guest > is unresponsive. This misbehavior could happen for a while and QEMU > does > not get out from this state automatically without the patch. >=20 > This change makes ehci_update_frindex execute in constant time. >=20 queued up for 2.7 thanks, Gerd