]> git.baikalelectronics.ru Git - kernel.git/commit
md: reduce CPU wastage on idle md array with a write-intent bitmap
authorNeilBrown <neilb@suse.de>
Tue, 4 Mar 2008 22:29:30 +0000 (14:29 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 5 Mar 2008 00:35:17 +0000 (16:35 -0800)
commitb96d509dde6284df8d6b09380b1f62f954a06879
treec869143fae8f135646300d1bac6639af5bb30dd7
parentab6a1bfbef9c2b6f4b3204bd953a43f7e4463b6c
md: reduce CPU wastage on idle md array with a write-intent bitmap

On an md array with a write-intent bitmap, a thread wakes up every few seconds
and scans the bitmap looking for work to do.  If the array is idle, there will
be no work to do, but a lot of scanning is done to discover this.

So cache the fact that the bitmap is completely clean, and avoid scanning the
whole bitmap when the cache is known to be clean.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/md/bitmap.c
include/linux/raid/bitmap.h