trunk/src/osd/modules/sync/work_osd.c
| r242727 | r242728 | |
| 249 | 249 | |
| 250 | 250 | if (osdworkqueuemaxthreads != NULL && sscanf(osdworkqueuemaxthreads, "%d", &osdthreadnum) == 1 && threadnum > osdthreadnum) |
| 251 | 251 | threadnum = osdthreadnum; |
| 252 | | |
| 253 | | // TODO: do we still have the scaling problems? |
| 252 | // TODO: also enable this for non-Windows platforms? |
| 254 | 253 | #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 |
| 256 | 255 | // since we have scaling problems above that |
| 257 | 256 | if ((flags & WORK_QUEUE_FLAG_HIGH_FREQ) && threadnum > 1) |
| 258 | | threadnum = MIN(threadnum - 1, 4); |
| 257 | threadnum = MIN(threadnum - 1, 3); |
| 259 | 258 | #endif |
| 260 | 259 | |
| 261 | 260 | // clamp to the maximum |
| r242727 | r242728 | |
| 267 | 266 | else |
| 268 | 267 | allocthreadnum = queue->threads; |
| 269 | 268 | |
| 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); |
| 271 | 270 | |
| 272 | 271 | queue->thread = (work_thread_info *)osd_malloc_array(allocthreadnum * sizeof(queue->thread[0])); |
| 273 | 272 | if (queue->thread == NULL) |