mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
writeback: Do not sort b_io list only because of block device inode
It is very likely that block device inode will be part of BDI dirty list as well. However it doesn't make sence to sort inodes on the b_io list just because of this inode (as it contains buffers all over the device anyway). So save some CPU cycles which is valuable since we hold relatively contented wb->list_lock. Signed-off-by: Jan Kara <[email protected]>
This commit is contained in:
parent
8bb495e3f0
commit
a8855990e3
3 changed files with 12 additions and 4 deletions
|
|
@ -68,7 +68,7 @@ static inline struct backing_dev_info *inode_to_bdi(struct inode *inode)
|
|||
{
|
||||
struct super_block *sb = inode->i_sb;
|
||||
|
||||
if (strcmp(sb->s_type->name, "bdev") == 0)
|
||||
if (sb_is_blkdev_sb(sb))
|
||||
return inode->i_mapping->backing_dev_info;
|
||||
|
||||
return sb->s_bdi;
|
||||
|
|
@ -250,11 +250,13 @@ static int move_expired_inodes(struct list_head *delaying_queue,
|
|||
if (work->older_than_this &&
|
||||
inode_dirtied_after(inode, *work->older_than_this))
|
||||
break;
|
||||
list_move(&inode->i_wb_list, &tmp);
|
||||
moved++;
|
||||
if (sb_is_blkdev_sb(inode->i_sb))
|
||||
continue;
|
||||
if (sb && sb != inode->i_sb)
|
||||
do_sb_sort = 1;
|
||||
sb = inode->i_sb;
|
||||
list_move(&inode->i_wb_list, &tmp);
|
||||
moved++;
|
||||
}
|
||||
|
||||
/* just one sb in list, splice to dispatch_queue and we're done */
|
||||
|
|
|
|||
Loading…
Reference in a new issue