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=-3.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no 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 1D26EC43331 for ; Wed, 1 Apr 2020 07:48:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DAAAA20714 for ; Wed, 1 Apr 2020 07:48:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ixDEoymZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732087AbgDAHss (ORCPT ); Wed, 1 Apr 2020 03:48:48 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:43407 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731680AbgDAHsr (ORCPT ); Wed, 1 Apr 2020 03:48:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585727326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ypssZ6zwvTHoDEme2IBh4Wgg7TJtOHNAKmXZ7+9lnoU=; b=ixDEoymZFrUiLu1s8lIpomh/Gr9veM/5/xXQP5cRtiuuiR3riAiNC8X/PWK7KLOWPIUAvk XGpOaYpB/IgzuHYJd3T0eA4bVAXHLpUgIii24/YEydFRV7IavHcg+OP7edFuGxnvaZUsHv 5rWIGiWD/6J6tQvhzwawa9GE5APohvg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-160-NxTG9kOAMS-4iwAdtPooaA-1; Wed, 01 Apr 2020 03:48:45 -0400 X-MC-Unique: NxTG9kOAMS-4iwAdtPooaA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7D59E18C35A0; Wed, 1 Apr 2020 07:48:44 +0000 (UTC) Received: from kamzik.brq.redhat.com (unknown [10.40.193.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3E16319C6A; Wed, 1 Apr 2020 07:48:29 +0000 (UTC) Date: Wed, 1 Apr 2020 09:48:21 +0200 From: Andrew Jones To: Peter Xu Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Kevin Tian , "Michael S . Tsirkin" , Jason Wang , Sean Christopherson , Christophe de Dinechin , Yan Zhao , Alex Williamson , Paolo Bonzini , Vitaly Kuznetsov , "Dr . David Alan Gilbert" Subject: Re: [PATCH v8 13/14] KVM: selftests: Let dirty_log_test async for dirty ring test Message-ID: <20200401074821.2tii2x2pzungea44@kamzik.brq.redhat.com> References: <20200331190000.659614-1-peterx@redhat.com> <20200331190000.659614-14-peterx@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200331190000.659614-14-peterx@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 31, 2020 at 02:59:59PM -0400, Peter Xu wrote: > Previously the dirty ring test was working in synchronous way, because > only with a vmexit (with that it was the ring full event) we'll know > the hardware dirty bits will be flushed to the dirty ring. > > With this patch we first introduced the vcpu kick mechanism by using > SIGUSR1, meanwhile we can have a guarantee of vmexit and also the > flushing of hardware dirty bits. With all these, we can keep the vcpu > dirty work asynchronous of the whole collection procedure now. Still, > we need to be very careful that we can only do it async if the vcpu is > not reaching soft limit (no KVM_EXIT_DIRTY_RING_FULL). Otherwise we > must collect the dirty bits before continuing the vcpu. > > Further increase the dirty ring size to current maximum to make sure > we torture more on the no-ring-full case, which should be the major > scenario when the hypervisors like QEMU would like to use this feature. > > Signed-off-by: Peter Xu > --- > tools/testing/selftests/kvm/dirty_log_test.c | 126 +++++++++++++----- > .../testing/selftests/kvm/include/kvm_util.h | 1 + > tools/testing/selftests/kvm/lib/kvm_util.c | 9 ++ > 3 files changed, 106 insertions(+), 30 deletions(-) > For the vcpu_kick and sem_wait stuff Reviewed-by: Andrew Jones