9 Aug 2012 10:58
[patch 2/2 v3]raid5: create multiple threads to handle stripes
Shaohua Li <shli <at> kernel.org>
2012-08-09 08:58:08 GMT
2012-08-09 08:58:08 GMT
This is a new tempt to make raid5 handle stripes in multiple threads, as suggested by Neil to have maxium flexibility and better numa binding. It basically is a combination of my first and second generation patches. By default, no multiple thread is enabled (all stripes are handled by raid5d). An example to enable multiple threads: #echo 3 > /sys/block/md0/md/auxthread_number This will create 3 auxiliary threads to handle stripes. The threads can run on any cpus and handle stripes produced by any cpus. #echo 1-3 > /sys/block/md0/md/auxth0/cpulist This will bind auxiliary thread 0 to cpu 1-3, and this thread will only handle stripes produced by cpu 1-3. User tool can further change the thread's affinity, but the thread can only handle stripes produced by cpu 1-3 till the sysfs entry is changed again. If stripes produced by a CPU aren't handled by any auxiliary thread, such stripes will be handled by raid5d. Otherwise, raid5d doesn't handle any stripes. Signed-off-by: Shaohua Li <shli <at> fusionio.com> --- drivers/md/md.c | 8 - drivers/md/md.h | 8 + drivers/md/raid5.c | 406 ++++++++++++++++++++++++++++++++++++++++++++++++++--- drivers/md/raid5.h | 19 ++ 4 files changed, 418 insertions(+), 23 deletions(-) Index: linux/drivers/md/raid5.c ===================================================================(Continue reading)
RSS Feed