Re: [Linaro-mm-sig] [PATCHv23 12/16] mm: trigger page reclaim in alloc_contig_range() to stabilise watermarks

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

 



> +static int __reclaim_pages(struct zone *zone, gfp_t gfp_mask, int count)
> +{
> +       /*
> +        * Increase level of watermarks to force kswapd do his job
> +        * to stabilise at new watermark level.
> +        */
> +       __update_cma_watermarks(zone, count);
> +
> +       /* Obey watermarks as if the page was being allocated */
> +       watermark = low_wmark_pages(zone) + count;
> +       while (!zone_watermark_ok(zone, 0, watermark, 0, 0)) {

Wouldn't this reclaim (2 * count pages) above low wmark?

You are updating the low wmark first and then adding "count"
for the zone_watermark_ok() check as well ..

Sandeep

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href


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