Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp216808rwi; Fri, 14 Oct 2022 00:30:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6l7nmwXTIdbc3pjwrN5vrf5TmznVyjBPwv5cKDkI1LHNEeVQgvUtRu/lSpW9XAqxa2B+A+ X-Received: by 2002:a05:6a00:2185:b0:520:7276:6570 with SMTP id h5-20020a056a00218500b0052072766570mr3937243pfi.84.1665732654015; Fri, 14 Oct 2022 00:30:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665732654; cv=none; d=google.com; s=arc-20160816; b=Dt67zQahaJ2t10BfiP8Xf3zKhTkr49kLffNBn6Tb7yUmk29l7+7SyRJmm10SAjAm1w mZz79ZGE27oh9TPIvZOVx26Xwk60obf6/yPx+CigpZQab4f/Ykqp3YwVTHtnNVlPHhkN 2Mb763GR/5i/JzOeD8EIibSyznNfbvm2fMzut6kKKtWZ2XMUumZC4P+cQVIWFMcSlRTZ 1ObWo6kGKX9pdC7b2UVShG/4c9gIcIhudHM+NbXiMV6JukGz/+1leFZJOlTFg1eCk9X1 cM91BQV6o8o1J4Yr5jWvrT/uyIcYXaU0pduEOrgv+UumHCDxk4RBV0kQM7IqWz5F+TYJ VdSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=D8s16tiZuYHA8WakFIbdUv+5nE3Pxop3GoZh9YyYHgw=; b=ZsuFxtDHnuJEUtWjEwSrEELzETVfpE9FtvIEAcauBNQSUZ+3Do0RQCn0kQ8d7n9+0d k4hFmeewANOmlx9V6/T57Qe6MPWoYQxl7G+X33vTofDVwg44nFBYbw2wScPhG4JUqMf8 Seu5sMGDZVCQoRBXn4efLWqpuBkETlYPHjs45xBf9LXsMRCqt7uxYmjcKCZB+57rugFD Ak418L0ExogSmwVMpwzpe5q6ojwpalFwaWtS0LXSsdaUc054k7npdC4DWJqo/MiIUbvy xUoub6EIxQU4nFnqUELQiTLkBeLTZLyj25C6kDuaIje81UlV9rNzSnpnfCxniwPvn6Pg rpEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Se+b6eXy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k10-20020a056a00134a00b00562fc008395si1925488pfu.341.2022.10.14.00.30.41; Fri, 14 Oct 2022 00:30:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Se+b6eXy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229666AbiJNHTt (ORCPT + 99 others); Fri, 14 Oct 2022 03:19:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbiJNHTr (ORCPT ); Fri, 14 Oct 2022 03:19:47 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6762E60C3 for ; Fri, 14 Oct 2022 00:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665731984; 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: content-transfer-encoding:content-transfer-encoding; bh=D8s16tiZuYHA8WakFIbdUv+5nE3Pxop3GoZh9YyYHgw=; b=Se+b6eXymRJx193JKXEQjjhYRPyNjYB2EdiVKaDJAdtBleXPW8Lj9TvivKNeMLrgp7ESNo lN3YJIj1uE45KavWEkyARpjSajQptWwGIQ3AJ8YlpGttbhlOt9NKJBzg/pSqLvx0Pt62vj tKIql6Yh12Bg+WKlRwKIJr83hDFoLt8= 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-526-cVPqaDGcOoClOmvlftlLug-1; Fri, 14 Oct 2022 03:19:43 -0400 X-MC-Unique: cVPqaDGcOoClOmvlftlLug-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C64ED833A0D; Fri, 14 Oct 2022 07:19:42 +0000 (UTC) Received: from gshan.redhat.com (vpn2-54-52.bne.redhat.com [10.64.54.52]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 40B36C06224; Fri, 14 Oct 2022 07:19:36 +0000 (UTC) From: Gavin Shan To: kvmarm@lists.linux.dev Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, ajones@ventanamicro.com, pbonzini@redhat.com, maz@kernel.org, shuah@kernel.org, oliver.upton@linux.dev, seanjc@google.com, peterx@redhat.com, maciej.szmigiero@oracle.com, ricarkol@google.com, zhenyzha@redhat.com, shan.gavin@gmail.com Subject: [PATCH 0/6] KVM: selftests: memslot_perf_test: aarch64 cleanup/fixes Date: Fri, 14 Oct 2022 15:19:08 +0800 Message-Id: <20221014071914.227134-1-gshan@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kvm/selftests/memslots_perf_test doesn't work with 64KB-page-size-host and 4KB-page-size-guest on aarch64. In the implementation, the host and guest page size have been hardcoded to 4KB. It's ovbiously not working on aarch64 which supports 4KB, 16KB, 64KB individually on host and guest. This series tries to fix it. After the series is applied, the test runs successfully with 64KB-page-size-host and 4KB-page-size-guest. # ./memslots_perf_tests -v -s 512 Since we're here, the code is cleaned up a bit as PATCH[1-3] do. The other patches are fixes to handle the mismatched host/guest page sized. Gavin Shan (6): KVM: selftests: memslot_perf_test: Use data->nslots in prepare_vm() KVM: selftests: memslot_perf_test: Consolidate loop conditions in prepare_vm() KVM: selftests: memslot_perf_test: Probe memory slots for once KVM: selftests: memslot_perf_test: Support variable guest page size KVM: selftests: memslot_perf_test: Consolidate memory sizes KVM: selftests: memslot_perf_test: Report optimal memory slots .../testing/selftests/kvm/memslot_perf_test.c | 286 +++++++++++------- 1 file changed, 183 insertions(+), 103 deletions(-) -- 2.23.0