Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102832015
D37646.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
921 B
Referenced Files
None
Subscribers
None
D37646.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D37646: bhyve: Tidy vCPU pthread startup.
Attached
Detach File
Event Timeline
Log In to Comment