Previous 199869 Revisions Next

r34216 Tuesday 6th January, 2015 at 11:00:32 UTC by Oliver Stöneberg
osd_work.c: limit WORK_QUEUE_FLAG_HIGH_FREQ to 3 threads since we don't scale well above / logging (nw)

tested with n64dd on Windows with Intel Sandy Bridge i7-2600k with GCC
and Visual Studio 2013 compiles with and without optimization
[src/osd/modules/sync]work_osd.c

trunk/src/osd/modules/sync/work_osd.c
r242727r242728
249249
250250   if (osdworkqueuemaxthreads != NULL && sscanf(osdworkqueuemaxthreads, "%d", &osdthreadnum) == 1 && threadnum > osdthreadnum)
251251      threadnum = osdthreadnum;
252
253   // TODO: do we still have the scaling problems?
252   // TODO: also enable this for non-Windows platforms?
254253#if defined(OSD_WINDOWS)
255   // multi-queues with high frequency items should top out at 4 for now
254   // multi-queues with high frequency items should top out at 3 for now
256255   // since we have scaling problems above that
257256   if ((flags & WORK_QUEUE_FLAG_HIGH_FREQ) && threadnum > 1)
258      threadnum = MIN(threadnum - 1, 4);
257      threadnum = MIN(threadnum - 1, 3);
259258#endif
260259
261260   // clamp to the maximum
r242727r242728
267266   else
268267      allocthreadnum = queue->threads;
269268
270   osd_printf_verbose("procs: %d threads: %d allocthreads: %d osdthreads: %d maxthreads: %d queuethreads: %d\n", osd_num_processors, threadnum, allocthreadnum, osdthreadnum, WORK_MAX_THREADS, queue->threads);
269   osd_printf_verbose("osdprocs: %d effecprocs: %d threads: %d allocthreads: %d osdthreads: %d maxthreads: %d queuethreads: %d\n", osd_num_processors, numprocs, threadnum, allocthreadnum, osdthreadnum, WORK_MAX_THREADS, queue->threads);
271270
272271   queue->thread = (work_thread_info *)osd_malloc_array(allocthreadnum * sizeof(queue->thread[0]));
273272   if (queue->thread == NULL)


Previous 199869 Revisions Next


© 1997-2024 The MAME Team