On 01/10/2014 08:00 AM, Mike Day wrote: > > Alexey Kardashevskiy <a...@ozlabs.ru> writes: > >> /* compute missing values, prefer sockets over cores over threads */ >> if (cpus == 0 || sockets == 0) { >> sockets = sockets > 0 ? sockets : 1; >> cores = cores > 0 ? cores : 1; >> - threads = threads > 0 ? threads : 1; >> + if (threads_max) { >> + if (threads > 0) { >> + fprintf(stderr, "Use either threads or threads_max\n"); >> + exit(1); > > If you went ahead with the threads="max" string option you wouldn't need > to check here for mutual excusivity and the user wouldn't need to worry > about an extra command options.
Is this the only concern and the rest is fine and can go to upstream? If so, I'll fix it and repost. >> + } >> + threads = smp_threads > 0 ? smp_threads : 1; >> + } else { >> + threads = threads > 0 ? threads : 1; >> + } >> if (cpus == 0) { >> cpus = cores * threads * sockets; >> } > -- Alexey