diff options
author | NeilBrown <neilb@suse.de> | 2008-03-04 17:29:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-04 19:35:17 -0500 |
commit | 8311c29d40235062a843f4a8e8a70a44af6fe4c9 (patch) | |
tree | c869143fae8f135646300d1bac6639af5bb30dd7 /include | |
parent | a35e63efa1fb18c6f20f38e3ddf3f8ffbcf0f6e7 (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/raid/bitmap.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h index e51b531cd0b2..47fbcba11850 100644 --- a/include/linux/raid/bitmap.h +++ b/include/linux/raid/bitmap.h | |||
@@ -235,6 +235,8 @@ struct bitmap { | |||
235 | 235 | ||
236 | unsigned long flags; | 236 | unsigned long flags; |
237 | 237 | ||
238 | int allclean; | ||
239 | |||
238 | unsigned long max_write_behind; /* write-behind mode */ | 240 | unsigned long max_write_behind; /* write-behind mode */ |
239 | atomic_t behind_writes; | 241 | atomic_t behind_writes; |
240 | 242 | ||