Hi,

On 2016-02-11 15:34:04 -0500, Rik van Riel wrote:
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index eb3dd37ccd7c..0a316c41bf80 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1928,13 +1928,14 @@ static inline bool inactive_anon_is_low(struct lruvec 
> *lruvec)
>   */
>  static bool inactive_file_is_low(struct lruvec *lruvec)
>  {
> +     struct zone *zone = lruvec_zone(lruvec);
>       unsigned long inactive;
>       unsigned long active;
>  
>       inactive = get_lru_size(lruvec, LRU_INACTIVE_FILE);
>       active = get_lru_size(lruvec, LRU_ACTIVE_FILE);
>  
> -     return active > inactive;
> +     return inactive * zone->inactive_ratio < active;
>  }

Oh, it looks to me like pat of inactive_file_is_low()'s description:
 *
 * When the system is doing streaming IO, memory pressure here
 * ensures that active file pages get deactivated, until more
 * than half of the file pages are on the inactive list.
 *
Would need updating with this patch.

Regards,

Andres Freund

Reply via email to