invalidate_bdev() speedup
We can immediately bale from invalidate_bdev() if the blockdev has no pagecache. This solves the huge IPI storms which hald is causing on the big ia64 machines when it polls CDROM drives. Acked-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cd62705f09
commit
b02ef087a8
+6
-1
@@ -473,13 +473,18 @@ out:
|
||||
pass does the actual I/O. */
|
||||
void invalidate_bdev(struct block_device *bdev, int destroy_dirty_buffers)
|
||||
{
|
||||
struct address_space *mapping = bdev->bd_inode->i_mapping;
|
||||
|
||||
if (mapping->nrpages == 0)
|
||||
return;
|
||||
|
||||
invalidate_bh_lrus();
|
||||
/*
|
||||
* FIXME: what about destroy_dirty_buffers?
|
||||
* We really want to use invalidate_inode_pages2() for
|
||||
* that, but not until that's cleaned up.
|
||||
*/
|
||||
invalidate_inode_pages(bdev->bd_inode->i_mapping);
|
||||
invalidate_inode_pages(mapping);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user