Previous 199869 Revisions Next

r34217 Tuesday 6th January, 2015 at 11:13:24 UTC by Oliver Stöneberg
osd_work.c: lowered SPIN_LOOP_TIME / TODOs (nw)

this at least greatly reduces the CPU load when running n64dd
[src/osd/modules/sync]work_osd.c

trunk/src/osd/modules/sync/work_osd.c
r242728r242729
5353
5454#define ENV_PROCESSORS               "OSDPROCESSORS"
5555
56// TODO: tests have shown, that 50000 appears to be the best value
56// TODO: use either
57// TODO: make configurable via environment for tests
5758#if defined(OSD_WINDOWS)
58#define SPIN_LOOP_TIME          (osd_ticks_per_second() / 1000)
59#define SPIN_LOOP_TIME          (osd_ticks_per_second() / 50000)
5960#else
6061#define INFINITE                (osd_ticks_per_second() *  (osd_ticks_t) 10000)
6162#define SPIN_LOOP_TIME          (osd_ticks_per_second() / 10000)
r242728r242729
250251   if (osdworkqueuemaxthreads != NULL && sscanf(osdworkqueuemaxthreads, "%d", &osdthreadnum) == 1 && threadnum > osdthreadnum)
251252      threadnum = osdthreadnum;
252253   // TODO: also enable this for non-Windows platforms?
254   // TODO: it appears lowering SPIN_LOOP_TIME value fixed the scaling issues - needs a test case with a higher workload than n64dd
253255#if defined(OSD_WINDOWS)
254256   // multi-queues with high frequency items should top out at 3 for now
255257   // since we have scaling problems above that


Previous 199869 Revisions Next


© 1997-2024 The MAME Team