qemu-devel
[Top][All Lists]
Advanced

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

Re: [EXTERNAL] Re: Range of vcpu_index to plugin callbacks


From: Robert Henry
Subject: Re: [EXTERNAL] Re: Range of vcpu_index to plugin callbacks
Date: Mon, 20 Sep 2021 19:03:02 +0000

Yes, the value of the cpu_index seems to track the number of clone() syscalls.  (I did strace the process, but forgot to look for clone() syscalls... I still have vfork()/execve() on the brain.)

From: Qemu-discuss <qemu-discuss-bounces+robhenry=microsoft.com@nongnu.org> on behalf of Philippe Mathieu-Daudé <f4bug@amsat.org>
Sent: Sunday, September 19, 2021 10:54 AM
To: rrh.henry <rrh.henry@gmail.com>; qemu-discuss@nongnu.org <qemu-discuss@nongnu.org>
Cc: Alex Bennée <alex.bennee@linaro.org>; qemu-devel <qemu-devel@nongnu.org>
Subject: [EXTERNAL] Re: Range of vcpu_index to plugin callbacks
 
(Cc'ing qemu-devel@ mailing list since this is a development question).

On 9/19/21 19:44, Robert Henry wrote:
> What is the range of the values for vcpu_index given to callbacks, such as:
>
> typedef void (*qemu_plugin_vcpu_udata_cb_t)(unsigned int vcpu_index,
> void *userdata);
>
> Empirically, when QEMU is in system mode, the maximum vcpu_index is 1
> less than the -smp cpus=$(NCPUS) value.
>
> Empirically, when QEMU is in user mode, the values for vcpu_index slowly
> increase without an apparent upper bound known statically (or when the
> plugin is loaded?).

Isn't it related to clone() calls? I'd expect new threads use
a new vCPU, incrementing vcpu_index. But that is just a guess
without having looked at the code to corroborate...

Regards,

Phil.


reply via email to

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