mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
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
This commit is contained in:
parent
c41db9fdd1
commit
0290d016d3
@ -249,13 +249,12 @@ osd_work_queue *osd_work_queue_alloc(int flags)
|
||||
|
||||
if (osdworkqueuemaxthreads != NULL && sscanf(osdworkqueuemaxthreads, "%d", &osdthreadnum) == 1 && threadnum > osdthreadnum)
|
||||
threadnum = osdthreadnum;
|
||||
|
||||
// TODO: do we still have the scaling problems?
|
||||
// TODO: also enable this for non-Windows platforms?
|
||||
#if defined(OSD_WINDOWS)
|
||||
// multi-queues with high frequency items should top out at 4 for now
|
||||
// multi-queues with high frequency items should top out at 3 for now
|
||||
// since we have scaling problems above that
|
||||
if ((flags & WORK_QUEUE_FLAG_HIGH_FREQ) && threadnum > 1)
|
||||
threadnum = MIN(threadnum - 1, 4);
|
||||
threadnum = MIN(threadnum - 1, 3);
|
||||
#endif
|
||||
|
||||
// clamp to the maximum
|
||||
@ -267,7 +266,7 @@ osd_work_queue *osd_work_queue_alloc(int flags)
|
||||
else
|
||||
allocthreadnum = queue->threads;
|
||||
|
||||
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);
|
||||
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);
|
||||
|
||||
queue->thread = (work_thread_info *)osd_malloc_array(allocthreadnum * sizeof(queue->thread[0]));
|
||||
if (queue->thread == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user