qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 23/26] tests/plugin: allow libinsn.so per-CPU counts


From: Emilio Cota
Subject: Re: [PATCH v3 23/26] tests/plugin: allow libinsn.so per-CPU counts
Date: Tue, 8 Feb 2022 21:39:36 -0500

(Sorry if this comes out garbled, I'm on a web editor not a proper email client)

On Fri, Feb 4, 2022 at 3:49 PM Alex Bennée <alex.bennee@linaro.org> wrote:
> +typedef struct {
> +    uint64_t last_pc;
> +    uint64_t insn_count;
> +} InstructionCount;

This will need padding to take up a cache line.

> +static InstructionCount counts[MAX_CPUS];

And this will need alignment so that it begins on a cache line as well
(although if the struct is aligned that might be enough).
See examples of QEMU_ALIGNED, e.g. in struct qht_bucket.

Doing this will avoid cache line ping-pong across vCPU threads
and therefore improve scalability.

+static bool do_frequency;

AFAICT is unused.

Thanks,
    Emilio



reply via email to

[Prev in Thread] Current Thread [Next in Thread]