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 Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EF3EC28D13 for ; Tue, 23 Aug 2022 03:09:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id A3E544D0F4; Mon, 22 Aug 2022 23:09:48 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@redhat.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HG6067brUXM8; Mon, 22 Aug 2022 23:09:47 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 539A04D0F9; Mon, 22 Aug 2022 23:09:47 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 71B614D0F5 for ; Mon, 22 Aug 2022 23:09:46 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N2i4MO41Ubgd for ; Mon, 22 Aug 2022 23:09:45 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 18C2E4D0F4 for ; Mon, 22 Aug 2022 23:09:45 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661224184; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PdyIPdKorQDXK1tldjSfL+LVZR0k6xko4u2KPDklhbE=; b=QwydER2+2JyOgIfJY7YFq8Feb7hIiPnKTn5a6U8cX7305qTaILwMmOvZgDiVOlw3HTTWrz B9TUPRTk5yRhpkIWJ5Mm+VrrK5GRR0EFxVs2tL6BAaSmGP7p6U77VSuHf7U2nAAA7jnDP6 xId6xZ0XPrPe7TgLJsnHjy8jciHKXMM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-663-d3zYu98qMW-lWG9QS1UrQg-1; Mon, 22 Aug 2022 23:09:42 -0400 X-MC-Unique: d3zYu98qMW-lWG9QS1UrQg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7EADE185A79C; Tue, 23 Aug 2022 03:09:41 +0000 (UTC) Received: from [10.64.54.16] (vpn2-54-16.bne.redhat.com [10.64.54.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6E92E492C3B; Tue, 23 Aug 2022 03:09:32 +0000 (UTC) Subject: Re: [PATCH v1 3/5] KVM: selftests: Dirty host pages in dirty_log_test From: Gavin Shan To: Andrew Jones References: <20220819005601.198436-1-gshan@redhat.com> <20220819005601.198436-4-gshan@redhat.com> <20220819052805.qnhw2d3arxixzvhl@kamzik> <3abb690f-e616-630f-ba40-e590ec8bb5c1@redhat.com> Message-ID: <0496fe72-e3da-9778-b307-eb5cc157e8fe@redhat.com> Date: Tue, 23 Aug 2022 13:09:28 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: <3abb690f-e616-630f-ba40-e590ec8bb5c1@redhat.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Cc: kvm@vger.kernel.org, linux-doc@vger.kernel.org, catalin.marinas@arm.com, linux-kselftest@vger.kernel.org, bgardon@google.com, shuah@kernel.org, kvmarm@lists.cs.columbia.edu, corbet@lwn.net, maz@kernel.org, shan.gavin@gmail.com, drjones@redhat.com, will@kernel.org, zhenyzha@redhat.com, dmatlack@google.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, pbonzini@redhat.com X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Gavin Shan List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu Hi Drew, On 8/22/22 4:29 PM, Gavin Shan wrote: > On 8/19/22 3:28 PM, Andrew Jones wrote: >> On Fri, Aug 19, 2022 at 08:55:59AM +0800, Gavin Shan wrote: >>> It's assumed that 1024 host pages, instead of guest pages, are dirtied >>> in each iteration in guest_code(). The current implementation misses >>> the case of mismatched page sizes in host and guest. For example, >>> ARM64 could have 64KB page size in guest, but 4KB page size in host. >>> (TEST_PAGES_PER_LOOP / 16), instead of TEST_PAGES_PER_LOOP, host pages >>> are dirtied in every iteration. >>> >>> Fix the issue by touching all sub-pages when we have mismatched >>> page sizes in host and guest. >> >> I'll let the dirty-log test authors decide what's best to do for this >> test, but I'd think we should let the guest continue dirtying its >> pages without knowledge of the host pages. Then, adjust the host test >> code to assert all sub-pages, other than the ones it expects the guest >> to have written, remain untouched. >> > > I don't think what is clarified in the change log is correct. The current > implementation already had the logic to handle the mismatched page sizes > in vm_dirty_log_verify() where 'step' is used for it by fetching value > from vm_num_host_pages(mode, 1). Please ignore this patch for now, as > explained below. > > The issue I have is the 'dirty_log_test' hangs when I have 4KB host page size > and 64KB guest page size. It seems the vcpu doesn't exit due to full ring > buffer state or kick-off. I will have more investigations to figure out the > root cause. > [...] Please ignore this PATCH[3/5], I think this should be fixed by selecting correct dirty ring count and the fix will be folded to PATCH[5/5] in next revision. In dirty_log_test, we have 1GB memory for guest to write and make them dirty. When we have mismatch page sizes on host and guest, which is either 4kb-host-64kb-guest or 64kb-host-4kb-guest apart from 16kb case, 16384 host pages are dirtied in each iteration. The default dirty ring count is 65536. So the vcpu never exit due to full-dirty-ring-buffer state. This leads the guest's code keep running and the dirty log isn't collected by the main thread. #define TEST_DIRTY_RING_COUNT 65536 dirty_pages_per_iteration = (0x40000000 / 0x10000) = 0x4000 = 16384 Thanks, Gavin _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0284EC28D13 for ; Tue, 23 Aug 2022 03:11:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239793AbiHWDLj (ORCPT ); Mon, 22 Aug 2022 23:11:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240180AbiHWDKy (ORCPT ); Mon, 22 Aug 2022 23:10:54 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CF7C5C9F9 for ; Mon, 22 Aug 2022 20:09:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661224189; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PdyIPdKorQDXK1tldjSfL+LVZR0k6xko4u2KPDklhbE=; b=Eoo/flel6hLt/KZy7cD9iidZ7wNixoQud4lCyOkgFFotYgL9bOqE06EOK0tUuljW78oYyl JzUkvaLEf5q44yYoQx/JMNsBPtnMH4dBfNmpEvRC57mlgzipcBrcttVbYQ/+c7dyujaWuv k1FgpzIGTExgr1/EZKqklYyd4S9aJco= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-663-d3zYu98qMW-lWG9QS1UrQg-1; Mon, 22 Aug 2022 23:09:42 -0400 X-MC-Unique: d3zYu98qMW-lWG9QS1UrQg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7EADE185A79C; Tue, 23 Aug 2022 03:09:41 +0000 (UTC) Received: from [10.64.54.16] (vpn2-54-16.bne.redhat.com [10.64.54.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6E92E492C3B; Tue, 23 Aug 2022 03:09:32 +0000 (UTC) Reply-To: Gavin Shan Subject: Re: [PATCH v1 3/5] KVM: selftests: Dirty host pages in dirty_log_test From: Gavin Shan To: Andrew Jones Cc: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, peterx@redhat.com, pbonzini@redhat.com, corbet@lwn.net, maz@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, catalin.marinas@arm.com, will@kernel.org, shuah@kernel.org, seanjc@google.com, drjones@redhat.com, dmatlack@google.com, bgardon@google.com, ricarkol@google.com, zhenyzha@redhat.com, shan.gavin@gmail.com References: <20220819005601.198436-1-gshan@redhat.com> <20220819005601.198436-4-gshan@redhat.com> <20220819052805.qnhw2d3arxixzvhl@kamzik> <3abb690f-e616-630f-ba40-e590ec8bb5c1@redhat.com> Message-ID: <0496fe72-e3da-9778-b307-eb5cc157e8fe@redhat.com> Date: Tue, 23 Aug 2022 13:09:28 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: <3abb690f-e616-630f-ba40-e590ec8bb5c1@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Drew, On 8/22/22 4:29 PM, Gavin Shan wrote: > On 8/19/22 3:28 PM, Andrew Jones wrote: >> On Fri, Aug 19, 2022 at 08:55:59AM +0800, Gavin Shan wrote: >>> It's assumed that 1024 host pages, instead of guest pages, are dirtied >>> in each iteration in guest_code(). The current implementation misses >>> the case of mismatched page sizes in host and guest. For example, >>> ARM64 could have 64KB page size in guest, but 4KB page size in host. >>> (TEST_PAGES_PER_LOOP / 16), instead of TEST_PAGES_PER_LOOP, host pages >>> are dirtied in every iteration. >>> >>> Fix the issue by touching all sub-pages when we have mismatched >>> page sizes in host and guest. >> >> I'll let the dirty-log test authors decide what's best to do for this >> test, but I'd think we should let the guest continue dirtying its >> pages without knowledge of the host pages. Then, adjust the host test >> code to assert all sub-pages, other than the ones it expects the guest >> to have written, remain untouched. >> > > I don't think what is clarified in the change log is correct. The current > implementation already had the logic to handle the mismatched page sizes > in vm_dirty_log_verify() where 'step' is used for it by fetching value > from vm_num_host_pages(mode, 1). Please ignore this patch for now, as > explained below. > > The issue I have is the 'dirty_log_test' hangs when I have 4KB host page size > and 64KB guest page size. It seems the vcpu doesn't exit due to full ring > buffer state or kick-off. I will have more investigations to figure out the > root cause. > [...] Please ignore this PATCH[3/5], I think this should be fixed by selecting correct dirty ring count and the fix will be folded to PATCH[5/5] in next revision. In dirty_log_test, we have 1GB memory for guest to write and make them dirty. When we have mismatch page sizes on host and guest, which is either 4kb-host-64kb-guest or 64kb-host-4kb-guest apart from 16kb case, 16384 host pages are dirtied in each iteration. The default dirty ring count is 65536. So the vcpu never exit due to full-dirty-ring-buffer state. This leads the guest's code keep running and the dirty log isn't collected by the main thread. #define TEST_DIRTY_RING_COUNT 65536 dirty_pages_per_iteration = (0x40000000 / 0x10000) = 0x4000 = 16384 Thanks, Gavin 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 30973C28D13 for ; Tue, 23 Aug 2022 03:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:Reply-To:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:Cc:To:From:Subject:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MPAjFKgGqa7/64XlxpI/y7R/VOCQZrPQp0kIgsqj+O0=; b=DDtOeslYzJEl1J MxxVNlKiuZtODsP5+ANKYOyc8D+F0wiLuXKrvASL1RR8jPFpGDhZmbTwdLqO/d8hN5rWz1NRMz5UV wqrvd8hVpoKZzdvW+1x4F1i5ulVPkyGIyRm+K3QVXdQd2keXuRJxBGwvcM+PwFs9RBRLWxkxv55Fn i/S7aBaH8mDNqOOQfXBoH2gjN6wz/NKM1qWdKNzSfUVWR0BL6ueirgoA5xW6pzcwwsPCDtOupMGm9 4jQa9DGkjvdTi+8s+tuN0JlKdk+CIzwD2XDo+u5JwoJvri7wwCI8JKF9utIxTvJvlgh/Y2SAn0kPM GXg8Os+uQdAcc0Bl4VYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQKIn-001BVC-Eq; Tue, 23 Aug 2022 03:10:06 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQKIX-001BEw-Bv for linux-arm-kernel@lists.infradead.org; Tue, 23 Aug 2022 03:09:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661224186; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PdyIPdKorQDXK1tldjSfL+LVZR0k6xko4u2KPDklhbE=; b=N8uNm3+5FO+bfXkXoPZGoPSp068oyOe2JTfc8/cFZ0eOVQtWKOTJPmanA1IFXFIwwIb2LG gizRnHk0xharb9v/FarcNVlkxOOQi2+IQi97y5mmUPqWITaZQTtqfx/ujXxa1y6AtHq3iQ Pu+taCJBZnHUcWITP4bltLyc8D+EIsQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-663-d3zYu98qMW-lWG9QS1UrQg-1; Mon, 22 Aug 2022 23:09:42 -0400 X-MC-Unique: d3zYu98qMW-lWG9QS1UrQg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7EADE185A79C; Tue, 23 Aug 2022 03:09:41 +0000 (UTC) Received: from [10.64.54.16] (vpn2-54-16.bne.redhat.com [10.64.54.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6E92E492C3B; Tue, 23 Aug 2022 03:09:32 +0000 (UTC) Subject: Re: [PATCH v1 3/5] KVM: selftests: Dirty host pages in dirty_log_test From: Gavin Shan To: Andrew Jones Cc: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, peterx@redhat.com, pbonzini@redhat.com, corbet@lwn.net, maz@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, catalin.marinas@arm.com, will@kernel.org, shuah@kernel.org, seanjc@google.com, drjones@redhat.com, dmatlack@google.com, bgardon@google.com, ricarkol@google.com, zhenyzha@redhat.com, shan.gavin@gmail.com References: <20220819005601.198436-1-gshan@redhat.com> <20220819005601.198436-4-gshan@redhat.com> <20220819052805.qnhw2d3arxixzvhl@kamzik> <3abb690f-e616-630f-ba40-e590ec8bb5c1@redhat.com> Message-ID: <0496fe72-e3da-9778-b307-eb5cc157e8fe@redhat.com> Date: Tue, 23 Aug 2022 13:09:28 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: <3abb690f-e616-630f-ba40-e590ec8bb5c1@redhat.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220822_200949_561768_20B7B42A X-CRM114-Status: GOOD ( 27.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Gavin Shan Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Drew, On 8/22/22 4:29 PM, Gavin Shan wrote: > On 8/19/22 3:28 PM, Andrew Jones wrote: >> On Fri, Aug 19, 2022 at 08:55:59AM +0800, Gavin Shan wrote: >>> It's assumed that 1024 host pages, instead of guest pages, are dirtied >>> in each iteration in guest_code(). The current implementation misses >>> the case of mismatched page sizes in host and guest. For example, >>> ARM64 could have 64KB page size in guest, but 4KB page size in host. >>> (TEST_PAGES_PER_LOOP / 16), instead of TEST_PAGES_PER_LOOP, host pages >>> are dirtied in every iteration. >>> >>> Fix the issue by touching all sub-pages when we have mismatched >>> page sizes in host and guest. >> >> I'll let the dirty-log test authors decide what's best to do for this >> test, but I'd think we should let the guest continue dirtying its >> pages without knowledge of the host pages. Then, adjust the host test >> code to assert all sub-pages, other than the ones it expects the guest >> to have written, remain untouched. >> > > I don't think what is clarified in the change log is correct. The current > implementation already had the logic to handle the mismatched page sizes > in vm_dirty_log_verify() where 'step' is used for it by fetching value > from vm_num_host_pages(mode, 1). Please ignore this patch for now, as > explained below. > > The issue I have is the 'dirty_log_test' hangs when I have 4KB host page size > and 64KB guest page size. It seems the vcpu doesn't exit due to full ring > buffer state or kick-off. I will have more investigations to figure out the > root cause. > [...] Please ignore this PATCH[3/5], I think this should be fixed by selecting correct dirty ring count and the fix will be folded to PATCH[5/5] in next revision. In dirty_log_test, we have 1GB memory for guest to write and make them dirty. When we have mismatch page sizes on host and guest, which is either 4kb-host-64kb-guest or 64kb-host-4kb-guest apart from 16kb case, 16384 host pages are dirtied in each iteration. The default dirty ring count is 65536. So the vcpu never exit due to full-dirty-ring-buffer state. This leads the guest's code keep running and the dirty log isn't collected by the main thread. #define TEST_DIRTY_RING_COUNT 65536 dirty_pages_per_iteration = (0x40000000 / 0x10000) = 0x4000 = 16384 Thanks, Gavin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel