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>
This commit is contained in:
parent
a35e63efa1
commit
8311c29d40
2 changed files with 19 additions and 2 deletions
|
@ -235,6 +235,8 @@ struct bitmap {
|
|||
|
||||
unsigned long flags;
|
||||
|
||||
int allclean;
|
||||
|
||||
unsigned long max_write_behind; /* write-behind mode */
|
||||
atomic_t behind_writes;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue