Messages in this thread Patch in this message | | | Date | Thu, 3 Aug 2006 22:39:42 -0700 | From | Greg KH <> | Subject | [patch 12/23] invalidate_bdev() speedup |
| |
-stable review patch. If anyone has any objections, please let us know.
------------------ From: Andrew Morton <akpm@osdl.org>
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>
--- fs/buffer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
--- linux-2.6.17.7.orig/fs/buffer.c +++ linux-2.6.17.7/fs/buffer.c @@ -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); } /* -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |