mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-01 17:06:28 +00:00
Merge pull request #2645 from dgibson/query-cpus
runtime/qemu: Move from query-cpus to query-cpus-fast
This commit is contained in:
@@ -2194,7 +2194,7 @@ func (q *qemu) getThreadIDs(ctx context.Context) (vcpuThreadIDs, error) {
|
|||||||
return tid, err
|
return tid, err
|
||||||
}
|
}
|
||||||
|
|
||||||
cpuInfos, err := q.qmpMonitorCh.qmp.ExecQueryCpus(q.qmpMonitorCh.ctx)
|
cpuInfos, err := q.qmpMonitorCh.qmp.ExecQueryCpusFast(q.qmpMonitorCh.ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
q.Logger().WithError(err).Error("failed to query cpu infos")
|
q.Logger().WithError(err).Error("failed to query cpu infos")
|
||||||
return tid, err
|
return tid, err
|
||||||
@@ -2203,7 +2203,7 @@ func (q *qemu) getThreadIDs(ctx context.Context) (vcpuThreadIDs, error) {
|
|||||||
tid.vcpus = make(map[int]int, len(cpuInfos))
|
tid.vcpus = make(map[int]int, len(cpuInfos))
|
||||||
for _, i := range cpuInfos {
|
for _, i := range cpuInfos {
|
||||||
if i.ThreadID > 0 {
|
if i.ThreadID > 0 {
|
||||||
tid.vcpus[i.CPU] = i.ThreadID
|
tid.vcpus[i.CPUIndex] = i.ThreadID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tid, nil
|
return tid, nil
|
||||||
|
Reference in New Issue
Block a user