summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/sync
diff options
context:
space:
mode:
author Oliver Stöneberg <oliverst@online.de>2015-01-07 16:47:09 +0100
committer Oliver Stöneberg <oliverst@online.de>2015-01-07 16:47:09 +0100
commit3bffa5e3cf27d40fa3d2ab4279d5f7f70c454463 (patch)
treeb8b51707b14626bfd6f63cff03f7da2b39ed3c44 /src/osd/modules/sync
parent7dd9bd50d8d2b0cf633c3d6a0332cd71d8b36221 (diff)
osd_work: use n threads when n CPUs are detected since modern CPUs have at least two cores per CPU (nw)
also makes -np use the actual number supplied across all platforms
Diffstat (limited to 'src/osd/modules/sync')
-rw-r--r--src/osd/modules/sync/work_osd.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/osd/modules/sync/work_osd.c b/src/osd/modules/sync/work_osd.c
index 8f022dc37b4..1d69d351621 100644
--- a/src/osd/modules/sync/work_osd.c
+++ b/src/osd/modules/sync/work_osd.c
@@ -208,16 +208,9 @@ osd_work_queue *osd_work_queue_alloc(int flags)
// on a single-CPU system, create 1 thread for I/O queues, and 0 threads for everything else
if (numprocs == 1)
threadnum = (flags & WORK_QUEUE_FLAG_IO) ? 1 : 0;
- // TODO: chose either
-#if defined(OSD_WINDOWS)
// on an n-CPU system, create n threads for multi queues, and 1 thread for everything else
else
threadnum = (flags & WORK_QUEUE_FLAG_MULTI) ? numprocs : 1;
-#else
- // on an n-CPU system, create (n-1) threads for multi queues, and 1 thread for everything else
- else
- threadnum = (flags & WORK_QUEUE_FLAG_MULTI) ? (numprocs - 1) : 1;
-#endif
if (osdworkqueuemaxthreads != NULL && sscanf(osdworkqueuemaxthreads, "%d", &osdthreadnum) == 1 && threadnum > osdthreadnum)
threadnum = osdthreadnum;