Re: [PATCH v4 09/31] inode: convert inode lru list to generic lru list code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 27, 2013 at 03:19:05AM +0400, Glauber Costa wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> [ glommer: adapted for new LRU return codes ]
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> Signed-off-by: Glauber Costa <glommer@xxxxxxxxxx>

Looks mostly mechanical with the main mess in the conversion of the
isolate function.

> +	if (inode_has_buffers(inode) || inode->i_data.nrpages) {
> +		__iget(inode);
> +		spin_unlock(&inode->i_lock);
> +		spin_unlock(lru_lock);
> +		if (remove_inode_buffers(inode)) {
> +			unsigned long reap;
> +			reap = invalidate_mapping_pages(&inode->i_data, 0, -1);
> +			if (current_is_kswapd())
> +				__count_vm_events(KSWAPD_INODESTEAL, reap);
> +			else
> +				__count_vm_events(PGINODESTEAL, reap);
> +			if (current->reclaim_state)
> +				current->reclaim_state->reclaimed_slab += reap;
>  		}
> +		iput(inode);
> +		spin_lock(lru_lock);
> +		return LRU_RETRY;
> +	}

Only concern is this and whether it can cause the lru_list_walk to
infinite loop if the inode is being continually used and the LRU list is
too small to win the race.

-- 
Mel Gorman
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]