lkml.org 
[lkml]   [2012]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [Linaro-mm-sig] [PATCHv23 12/16] mm: trigger page reclaim in alloc_contig_range() to stabilise watermarks
> +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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-03-08 22:29    [W:0.114 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site