From 0290d016d345dd23222ae975137137f06d985815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Tue, 6 Jan 2015 12:00:32 +0100 Subject: 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 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/osd/modules/sync/work_osd.c b/src/osd/modules/sync/work_osd.c index e7e13cad716..ba2de7b6e25 100644 --- a/src/osd/modules/sync/work_osd.c +++ b/src/osd/modules/sync/work_osd.c @@ -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) -- cgit v1.2.3