mirror of
https://github.com/GOSTSec/sgminer
synced 2025-08-27 14:21:57 +00:00
Show which cpu mining thread when giving affinity message.
This commit is contained in:
parent
58f6bf42e2
commit
f0dcd127b4
@ -59,7 +59,7 @@ static inline void affine_to_cpu(int id, int cpu)
|
|||||||
CPU_ZERO(&set);
|
CPU_ZERO(&set);
|
||||||
CPU_SET(cpu, &set);
|
CPU_SET(cpu, &set);
|
||||||
sched_setaffinity(0, sizeof(&set), &set);
|
sched_setaffinity(0, sizeof(&set), &set);
|
||||||
applog(LOG_INFO, "Binding thread %d to cpu %d", id, cpu);
|
applog(LOG_INFO, "Binding cpu mining thread %d to cpu %d", id, cpu);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static inline void drop_policy(void)
|
static inline void drop_policy(void)
|
||||||
@ -735,7 +735,7 @@ static void *miner_thread(void *userdata)
|
|||||||
/* Cpu affinity only makes sense if the number of threads is a multiple
|
/* Cpu affinity only makes sense if the number of threads is a multiple
|
||||||
* of the number of CPUs */
|
* of the number of CPUs */
|
||||||
if (!(opt_n_threads % num_processors))
|
if (!(opt_n_threads % num_processors))
|
||||||
affine_to_cpu(cpu_from_thr_id(thr_id), thr_id % num_processors);
|
affine_to_cpu(thr_id - gpu_threads, cpu_from_thr_id(thr_id));
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
struct work work __attribute__((aligned(128)));
|
struct work work __attribute__((aligned(128)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user