trunk/src/osd/modules/sync/work_osd.c
| r242758 | r242759 | |
| 207 | 207 | // on a single-CPU system, create 1 thread for I/O queues, and 0 threads for everything else |
| 208 | 208 | if (numprocs == 1) |
| 209 | 209 | threadnum = (flags & WORK_QUEUE_FLAG_IO) ? 1 : 0; |
| 210 | | // on an n-CPU system, create n threads for multi queues, and 1 thread for everything else |
| 210 | // on an n-CPU system, create n-1 threads for multi queues, and 1 thread for everything else |
| 211 | 211 | else |
| 212 | | threadnum = (flags & WORK_QUEUE_FLAG_MULTI) ? numprocs : 1; |
| 212 | threadnum = (flags & WORK_QUEUE_FLAG_MULTI) ? (numprocs - 1) : 1; |
| 213 | 213 | |
| 214 | 214 | if (osdworkqueuemaxthreads != NULL && sscanf(osdworkqueuemaxthreads, "%d", &osdthreadnum) == 1 && threadnum > osdthreadnum) |
| 215 | 215 | threadnum = osdthreadnum; |