Page MenuHomeFreeBSD

D37646.diff
No OneTemporary

D37646.diff

diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -525,7 +525,7 @@
{
char tname[MAXCOMLEN + 1];
struct mt_vmm_info *mtp;
- int vcpu;
+ int error, vcpu;
mtp = param;
vcpu = mtp->mt_vcpu;
@@ -533,6 +533,12 @@
snprintf(tname, sizeof(tname), "vcpu %d", vcpu);
pthread_set_name_np(mtp->mt_thr, tname);
+ if (vcpumap[vcpu] != NULL) {
+ error = pthread_setaffinity_np(mtp->mt_thr, sizeof(cpuset_t),
+ vcpumap[vcpu]);
+ assert(error == 0);
+ }
+
#ifdef BHYVE_SNAPSHOT
checkpoint_cpu_add(vcpu);
#endif
@@ -971,12 +977,6 @@
enum vm_exitcode exitcode;
cpuset_t active_cpus;
- if (vcpumap[vcpu] != NULL) {
- error = pthread_setaffinity_np(pthread_self(),
- sizeof(cpuset_t), vcpumap[vcpu]);
- assert(error == 0);
- }
-
error = vm_active_cpus(ctx, &active_cpus);
assert(CPU_ISSET(vcpu, &active_cpus));

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 6:16 PM (20 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14702419
Default Alt Text
D37646.diff (921 B)

Event Timeline