[Qemu-devel] [kvm-unit-tests PATCH v7 00/11] QEMU MTTCG Test cases

Andrew Jones drjones at redhat.com
Mon Nov 28 03:58:24 PST 2016


On Mon, Nov 28, 2016 at 11:14:48AM +0000, Peter Maydell wrote:
> On 28 November 2016 at 11:12, Alex Bennée <alex.bennee at linaro.org> wrote:
> >
> > Andrew Jones <drjones at redhat.com> writes:
> >> I've skimmed over everything looking at it from a framwork/sytle
> >> perspective. I didn't dig in trying to understand the tests though.
> >> One general comment, I see many tests introduce MAX_CPUS 8. Why do
> >> that? Why not allow all cpus by using NR_CPUS for the array sizes?
> >
> > Yeah - I can fix those. I wonder what the maximum is with GIC V3?
> 
> So large that you don't want to hardcode it as an array size...

255 with the gic series, not yet merged. Even if you have a dozen arrays
with that as the size, then unless your array element size is huge (on
the order multiple pages), then it probably doesn't matter. Using the
default memory allocation of a QEMU guest, 128 MB, unit tests have plenty
of memory at their disposal. The framework itself only allocates a handful
of pages.

Of course the framework also supports dynamic memory allocation, so you
could do malloc(nr_cpus * element_size), to avoid excess.

Thanks,
drew



More information about the linux-arm-kernel mailing list