[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABVgOSmBpDxR_6xQWSqMuBjvtQW=ATkGgrWsSygReKYdov1GJw@mail.gmail.com>
Date: Tue, 5 Nov 2024 16:36:52 +0800
From: David Gow <davidgow@...gle.com>
To: Tamir Duberstein <tamird@...il.com>
Cc: Brendan Higgins <brendan.higgins@...ux.dev>, Rae Moar <rmoar@...gle.com>,
Alyssa Ross <hi@...ssa.is>, Thomas Weißschuh <thomas@...ch.de>,
linux-kselftest@...r.kernel.org, kunit-dev@...glegroups.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] kunit: enable hardware acceleration when available
On Sat, 2 Nov 2024 at 20:10, Tamir Duberstein <tamird@...il.com> wrote:
>
> Use KVM or HVF if supported by the QEMU binary and available on the
> system.
>
> This produces a nice improvement on my Apple M3 Pro running macOS 14.7:
>
> Before:
> ./tools/testing/kunit/kunit.py exec --arch arm64
> [HH:MM:SS] Elapsed time: 10.145s
>
> After:
> ./tools/testing/kunit/kunit.py exec --arch arm64
> [HH:MM:SS] Elapsed time: 1.773s
>
> Signed-off-by: Tamir Duberstein <tamird@...il.com>
> ---
Thanks a lot.
I finally managed to dig up an arm64 machine and test this, and I can
reproduce the performance improvement.
Reviewed-by: David Gow <davidgow@...gle.com>
Cheers,
-- David
> tools/testing/kunit/kunit_kernel.py | 3 +++
> tools/testing/kunit/qemu_configs/arm64.py | 2 +-
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kernel.py
> index 61931c4926fd6645f2c62dd13f9842a432ec4167..3146acb884ecf0bcff94d5938535aabd4486fe82 100644
> --- a/tools/testing/kunit/kunit_kernel.py
> +++ b/tools/testing/kunit/kunit_kernel.py
> @@ -123,6 +123,9 @@ class LinuxSourceTreeOperationsQemu(LinuxSourceTreeOperations):
> '-append', ' '.join(params + [self._kernel_command_line]),
> '-no-reboot',
> '-nographic',
> + '-accel', 'kvm',
> + '-accel', 'hvf',
> + '-accel', 'tcg',
> '-serial', self._serial] + self._extra_qemu_params
> # Note: shlex.join() does what we want, but requires python 3.8+.
> print('Running tests with:\n$', ' '.join(shlex.quote(arg) for arg in qemu_command))
> diff --git a/tools/testing/kunit/qemu_configs/arm64.py b/tools/testing/kunit/qemu_configs/arm64.py
> index d3ff27024755411441f910799be30399295c9541..5c44d3a87e6dd2cd6b086138186a277a1473585b 100644
> --- a/tools/testing/kunit/qemu_configs/arm64.py
> +++ b/tools/testing/kunit/qemu_configs/arm64.py
> @@ -9,4 +9,4 @@ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y''',
> qemu_arch='aarch64',
> kernel_path='arch/arm64/boot/Image.gz',
> kernel_command_line='console=ttyAMA0',
> - extra_qemu_params=['-machine', 'virt', '-cpu', 'max,pauth-impdef=on'])
> + extra_qemu_params=['-machine', 'virt', '-cpu', 'max'])
>
> --
> 2.47.0
>
Download attachment "smime.p7s" of type "application/pkcs7-signature" (5294 bytes)
Powered by blists - more mailing lists