trunk/src/osd/modules/sync/work_osd.c
| r242749 | r242750 | |
| 208 | 208 | // on a single-CPU system, create 1 thread for I/O queues, and 0 threads for everything else |
| 209 | 209 | if (numprocs == 1) |
| 210 | 210 | threadnum = (flags & WORK_QUEUE_FLAG_IO) ? 1 : 0; |
| 211 | | // TODO: chose either |
| 212 | | #if defined(OSD_WINDOWS) |
| 213 | 211 | // on an n-CPU system, create n threads for multi queues, and 1 thread for everything else |
| 214 | 212 | else |
| 215 | 213 | threadnum = (flags & WORK_QUEUE_FLAG_MULTI) ? numprocs : 1; |
| 216 | | #else |
| 217 | | // on an n-CPU system, create (n-1) threads for multi queues, and 1 thread for everything else |
| 218 | | else |
| 219 | | threadnum = (flags & WORK_QUEUE_FLAG_MULTI) ? (numprocs - 1) : 1; |
| 220 | | #endif |
| 221 | 214 | |
| 222 | 215 | if (osdworkqueuemaxthreads != NULL && sscanf(osdworkqueuemaxthreads, "%d", &osdthreadnum) == 1 && threadnum > osdthreadnum) |
| 223 | 216 | threadnum = osdthreadnum; |