Previous 199869 Revisions Next

r34247 Wednesday 7th January, 2015 at 22:41:03 UTC by Oliver Stöneberg
osd_work: default back to numproc-1 threads for WORK_QUEUE_FLAG_MULTI (nw)
[src/osd/modules/sync]work_osd.c

trunk/src/osd/modules/sync/work_osd.c
r242758r242759
207207   // on a single-CPU system, create 1 thread for I/O queues, and 0 threads for everything else
208208   if (numprocs == 1)
209209      threadnum = (flags & WORK_QUEUE_FLAG_IO) ? 1 : 0;
210   // on an n-CPU system, create n threads for multi queues, and 1 thread for everything else
210   // on an n-CPU system, create n-1 threads for multi queues, and 1 thread for everything else
211211   else
212      threadnum = (flags & WORK_QUEUE_FLAG_MULTI) ? numprocs : 1;
212      threadnum = (flags & WORK_QUEUE_FLAG_MULTI) ? (numprocs - 1) : 1;
213213
214214   if (osdworkqueuemaxthreads != NULL && sscanf(osdworkqueuemaxthreads, "%d", &osdthreadnum) == 1 && threadnum > osdthreadnum)
215215      threadnum = osdthreadnum;


Previous 199869 Revisions Next


© 1997-2024 The MAME Team