On Thu, 29 Aug 2013 15:40:32 +0800 Shaohua Li <shli@xxxxxxxxxx> wrote: return batch_size; > > > > I think this could possibly return with ->working still 'true'. > > I think it is safest to clear it on every exit from the function > > Ok, this one doesn't matter too, I fixed it. > > Subject:raid5: only wakeup necessary threads > > 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 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 <shli@xxxxxxxxxxxx> Thanks. I removed the 'working_cnt' field as it wasn't being used, and have applied and push out the patch. NeilBrown
Attachment:
signature.asc
Description: PGP signature