Re: [PATCH] perf bench sched cpu-matrix benchmark

From: Ingo Molnar
Date: Thu Nov 10 2011 - 09:53:44 EST



* Kamalesh Babulal <kamalesh@xxxxxxxxxxxxxxxxxx> wrote:

> Hi,
>
> During the discussion of the nohz load balancer fix
> (https://lkml.org/lkml/2011/9/27/197), Ingo Molnar suggested
> to replace the simple while1 loop, used for publishing the
> test results with cpu-matrix test. This patch adds cpu-matrix
> benchmark under perf bench.
>
> TODO:
> - Provide option to run main thread at real-time priority.
> - Provide option for changing scheduling priority/policy
> of worker threads.
>
>
> perf bench: Add sched cpu-matrix benchmark
>
> perf bench sched cpu-matrix benchmark is a matrix multiplication
> workload, which can be replaced with the traditional while1
> cpu hog.
>
> Example of usage:
>
> % perf bench sched cpu-matrix
> # Running sched/cpu-matrix benchmark...
>
> Multiplication of [20] x [20] matrix, using [1] threads
> Total time: 0.000170 [sec]
>
> % perf bench sched cpu-matrix -s1k -t3
> # Running sched/cpu-matrix benchmark...
> elapsed time = 0.100066 sec, progress = 27270868
> elapsed time = 0.100079 sec, progress = 27299841
> elapsed time = 0.100071 sec, progress = 27253513
> elapsed time = 0.100073 sec, progress = 27272693
> elapsed time = 0.100090 sec, progress = 10208415
>
> Multiplication of [1024] x [1024] matrix, using [3] threads
> Total time: 0.500495 [sec]

It would be nice to also print the *size* of the matrix, in MBs or
so. 1024x1024 of int, long, float ... or double?

Looks pretty useful otherwise. Arnaldo, any objections?

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/