mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-09 14:28:12 +00:00
per-pool gpu-fan
This commit is contained in:
parent
9ec87cfc1a
commit
2ec09155e6
@ -56,6 +56,7 @@ global settings:
|
|||||||
* pool-gpu-memclock
|
* pool-gpu-memclock
|
||||||
* pool-gpu-threads
|
* pool-gpu-threads
|
||||||
* pool-thread-concurrency
|
* pool-thread-concurrency
|
||||||
|
* pool-gpu-fan
|
||||||
|
|
||||||
## CLI-only options
|
## CLI-only options
|
||||||
|
|
||||||
|
1
miner.h
1
miner.h
@ -1225,6 +1225,7 @@ struct pool {
|
|||||||
const char *gpu_engine;
|
const char *gpu_engine;
|
||||||
const char *gpu_memclock;
|
const char *gpu_memclock;
|
||||||
const char *gpu_threads;
|
const char *gpu_threads;
|
||||||
|
const char *gpu_fan;
|
||||||
|
|
||||||
pthread_mutex_t pool_lock;
|
pthread_mutex_t pool_lock;
|
||||||
cglock_t data_lock;
|
cglock_t data_lock;
|
||||||
|
17
sgminer.c
17
sgminer.c
@ -836,6 +836,13 @@ static char *set_pool_gpu_threads(const char *arg)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char *set_pool_gpu_fan(const char *arg)
|
||||||
|
{
|
||||||
|
struct pool *pool = get_current_pool();
|
||||||
|
pool->gpu_fan = arg;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static char *set_pool_nfactor(const char *arg)
|
static char *set_pool_nfactor(const char *arg)
|
||||||
{
|
{
|
||||||
struct pool *pool = get_current_pool();
|
struct pool *pool = get_current_pool();
|
||||||
@ -1328,7 +1335,9 @@ static struct opt_table opt_config_table[] = {
|
|||||||
OPT_WITH_ARG("--pool-gpu-threads",
|
OPT_WITH_ARG("--pool-gpu-threads",
|
||||||
set_pool_gpu_threads, NULL, NULL,
|
set_pool_gpu_threads, NULL, NULL,
|
||||||
"Number of threads per GPU for pool"),
|
"Number of threads per GPU for pool"),
|
||||||
|
OPT_WITH_ARG("--pool-gpu-fan",
|
||||||
|
set_pool_gpu_fan, NULL, NULL,
|
||||||
|
"GPU fan for pool"),
|
||||||
#endif
|
#endif
|
||||||
OPT_WITH_ARG("--lookup-gap",
|
OPT_WITH_ARG("--lookup-gap",
|
||||||
set_lookup_gap, NULL, NULL,
|
set_lookup_gap, NULL, NULL,
|
||||||
@ -6201,6 +6210,12 @@ static void get_work_prepare_thread(struct thr_info *mythr, struct work *work)
|
|||||||
for (i = 0; i < nDevs; i++)
|
for (i = 0; i < nDevs; i++)
|
||||||
set_memoryclock(i, gpus[i].gpu_memclock);
|
set_memoryclock(i, gpus[i].gpu_memclock);
|
||||||
}
|
}
|
||||||
|
if (work->pool->gpu_fan) {
|
||||||
|
set_gpu_fan(work->pool->gpu_fan);
|
||||||
|
for (i = 0; i < nDevs; i++)
|
||||||
|
if (gpus[i].min_fan == gpus[i].gpu_fan)
|
||||||
|
set_fanspeed(i, gpus[i].gpu_fan);
|
||||||
|
}
|
||||||
// Change algorithm for each thread (thread_prepare calls initCl)
|
// Change algorithm for each thread (thread_prepare calls initCl)
|
||||||
for (i = 0; i < mining_threads; i++) {
|
for (i = 0; i < mining_threads; i++) {
|
||||||
struct thr_info *thr = mining_thr[i];
|
struct thr_info *thr = mining_thr[i];
|
||||||
|
Loading…
Reference in New Issue
Block a user