[patch 3/3 v2] raid5: only wakeup necessary threads

2013-08-11 Thread Shaohua Li
If there are no enough stripes to handle, we'd better not always queue all available work_structs. If one worker can only handle small or even none stripes, it will impact request merge and create lock contention. With this patch, the number of work_struct running will depend on pending stripes

[patch 3/3 v2] raid5: only wakeup necessary threads

2013-08-11 Thread Shaohua Li
If there are no enough stripes to handle, we'd better not always queue all available work_structs. If one worker can only handle small or even none stripes, it will impact request merge and create lock contention. With this patch, the number of work_struct running will depend on pending stripes