diff options
| author | Glenn Elliott <gelliott@cs.unc.edu> | 2014-06-06 12:16:36 -0400 |
|---|---|---|
| committer | Glenn Elliott <gelliott@cs.unc.edu> | 2014-06-06 12:16:36 -0400 |
| commit | 963d692458fdcd87dabe599d92b70f67a4c15f0b (patch) | |
| tree | d4696682e72f491c972c6f2788d95f7d7fb9204d | |
| parent | 4cc5780a04d827e075a383b2c37a7fca304c3607 (diff) | |
Remove unneeded code from domain migration.
This patch removes unneeded code from be_migrate_thread_to_domain().
This function no longer needs to check the number of online
CPUs since the CPU mask for a given domain is now returned directly
from read_mapping().
| -rw-r--r-- | src/migration.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/migration.c b/src/migration.c index b01d87b..ae7761b 100644 --- a/src/migration.c +++ b/src/migration.c | |||
| @@ -202,7 +202,7 @@ int be_migrate_thread_to_cpu(pid_t tid, int target_cpu) | |||
| 202 | 202 | ||
| 203 | int be_migrate_thread_to_domain(pid_t tid, int domain) | 203 | int be_migrate_thread_to_domain(pid_t tid, int domain) |
| 204 | { | 204 | { |
| 205 | int ret, num_cpus; | 205 | int ret; |
| 206 | cpu_set_t *cpu_set; | 206 | cpu_set_t *cpu_set; |
| 207 | size_t sz; | 207 | size_t sz; |
| 208 | 208 | ||
| @@ -210,10 +210,6 @@ int be_migrate_thread_to_domain(pid_t tid, int domain) | |||
| 210 | if (ret != 0) | 210 | if (ret != 0) |
| 211 | return ret; | 211 | return ret; |
| 212 | 212 | ||
| 213 | num_cpus = num_online_cpus(); | ||
| 214 | if (num_cpus == -1) | ||
| 215 | return -1; | ||
| 216 | |||
| 217 | /* apply to caller */ | 213 | /* apply to caller */ |
| 218 | if (tid == 0) | 214 | if (tid == 0) |
| 219 | tid = gettid(); | 215 | tid = gettid(); |
