From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D10FDC4321D for ; Fri, 24 Aug 2018 09:36:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5CFC421712 for ; Fri, 24 Aug 2018 09:36:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5CFC421712 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726840AbeHXNKd (ORCPT ); Fri, 24 Aug 2018 09:10:33 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:52814 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726449AbeHXNKd (ORCPT ); Fri, 24 Aug 2018 09:10:33 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ABA4B7DAC9; Fri, 24 Aug 2018 09:36:43 +0000 (UTC) Received: from xz-x1 (ovpn-12-107.pek2.redhat.com [10.72.12.107]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A2E4A1007260; Fri, 24 Aug 2018 09:36:38 +0000 (UTC) Date: Fri, 24 Aug 2018 17:36:35 +0800 From: Peter Xu To: Jason Wang Cc: mst@redhat.com, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] vhost: correctly check the iova range when waking virtqueue Message-ID: <20180824093635.GC3020@xz-x1> References: <20180824085313.21798-1-jasowang@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180824085313.21798-1-jasowang@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Fri, 24 Aug 2018 09:36:43 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Fri, 24 Aug 2018 09:36:43 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'peterx@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 24, 2018 at 04:53:13PM +0800, Jason Wang wrote: > We don't wakeup the virtqueue if the first byte of pending iova range > is the last byte of the range we just got updated. This will lead a > virtqueue to wait for IOTLB updating forever. Fixing by correct the > check and wake up the virtqueue in this case. > > Fixes: 6b1e6cc7855b ("vhost: new device IOTLB API") > Reported-by: Peter Xu > Signed-off-by: Jason Wang Without this patch, this command will trigger the IO hang merely every time from host to guest: netperf -H 1.2.3.4 -l 5 -t TCP_RR -- -b 100 After applying, I can run it 10 times continuously without a problem. Reviewed-by: Peter Xu Tested-by: Peter Xu Thanks, -- Peter Xu