From: Shaohua Li Date: Thu, 29 Aug 2013 07:40:32 +0000 (+0800) Subject: raid5: only wakeup necessary threads X-Git-Tag: v3.12-rc1~71^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfc90cb0936f5b972706625f38f72c7cb726c20a;p=pandora-kernel.git raid5: only wakeup necessary threads If there are not 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 number. Note: some statistics info used in the patch are accessed without locking protection. This should doesn't matter, we just try best to avoid queue unnecessary work_struct. Signed-off-by: Shaohua Li Signed-off-by: NeilBrown --- Reading git-diff-tree failed