Re: [PATCH 19/28] perf bench: Add epoll parallel epoll_wait benchmark

From: Like Xu
Date: Mon Jul 29 2024 - 07:54:51 EST


Hi guys,

On 11/22/18 11:36 AM, Arnaldo Carvalho de Melo wrote:
+ /* default to the number of CPUs and leave one for the writer pthread */
+ if (!nthreads)
+ nthreads = cpu->nr - 1;

If there is only one CPU (e.g. a virtualized VM with only one vCPU),
what is the correct test model for epoll_wait benchmark ?

Is the behavior the same as using -t to explicitly specify 1:

$ perf bench epoll wait -r 30 -t 1

or do we need:

nthreads = max(perf_cpu_map__nr(cpu) - 1, 1);

?