Re: [PATCH] mm: vmscan: fix the page state calculation in too_many_isolated

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

 



On Tue, Jan 13, 2015 at 04:37:27PM +0530, Vinayak Menon wrote:
> @@ -1392,6 +1392,44 @@ int isolate_lru_page(struct page *page)
>  	return ret;
>  }
>  
> +static int __too_many_isolated(struct zone *zone, int file,
> +	struct scan_control *sc, int safe)
> +{
> +	unsigned long inactive, isolated;
> +
> +	if (file) {
> +		if (safe) {
> +			inactive = zone_page_state_snapshot(zone,
> +					NR_INACTIVE_FILE);
> +			isolated = zone_page_state_snapshot(zone,
> +					NR_ISOLATED_FILE);
> +		} else {
> +			inactive = zone_page_state(zone, NR_INACTIVE_FILE);
> +			isolated = zone_page_state(zone, NR_ISOLATED_FILE);
> +		}
> +	} else {
> +		if (safe) {
> +			inactive = zone_page_state_snapshot(zone,
> +					NR_INACTIVE_ANON);
> +			isolated = zone_page_state_snapshot(zone,
> +					NR_ISOLATED_ANON);
> +		} else {
> +			inactive = zone_page_state(zone, NR_INACTIVE_ANON);
> +			isolated = zone_page_state(zone, NR_ISOLATED_ANON);
> +		}
> +	}

	if (safe) {
		inactive = zone_page_state_snapshot(zone, NR_INACTIVE_ANON + 2*file)
		isolated = zone_page_state_snapshot(zone, NR_ISOLATED_ANON + file)
	} else {
		inactive = zone_page_state(zone, NR_INACTIVE_ANON + 2*file)
		isolated = zone_page_state(zone, NR_ISOLATED_ANON + file)
	}

--
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]