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

2013-07-29 Thread shli
If there are no enough stripes to handle, we'd better now 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 nu

[patch 2/3] raid5: sysfs entry to control worker thread number

2013-07-29 Thread shli
Add a sysfs entry to control running workqueue thread number. If group_thread_cnt is set to 0, we will disable workqueue offload handling of stripes. Signed-off-by: Shaohua Li --- drivers/md/raid5.c | 60 + 1 file changed, 60 insertions(+) I

[patch 1/3] raid5: offload stripe handle to workqueue

2013-07-29 Thread shli
This is another attempt to create multiple threads to handle raid5 stripes. This time I use workqueue. raid5 handles request (especially write) in stripe unit. A stripe is page size aligned/long and acrosses all disks. Writing to any disk sector, raid5 runs a state machine for the corresponding st

[patch 0/3] raid5: make stripe handling multi-threading

2013-07-29 Thread shli
Neil, This is another attempt to make raid5 stripe handling multi-threading. Recent workqueue improvement for unbound workqueue looks very promising to the raid5 usage. I had details in the first patch. The patches are against your tree with patch 'raid5: make release_stripe lockless' and 'raid5: