From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx162.postini.com [74.125.245.162]) by kanga.kvack.org (Postfix) with SMTP id 0B4596B002C for ; Thu, 8 Mar 2012 16:25:54 -0500 (EST) Received: by bkwq16 with SMTP id q16so991717bkw.14 for ; Thu, 08 Mar 2012 13:25:53 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1329929337-16648-13-git-send-email-m.szyprowski@samsung.com> References: <1329929337-16648-1-git-send-email-m.szyprowski@samsung.com> <1329929337-16648-13-git-send-email-m.szyprowski@samsung.com> From: Sandeep Patil Date: Thu, 8 Mar 2012 13:25:13 -0800 Message-ID: Subject: Re: [Linaro-mm-sig] [PATCHv23 12/16] mm: trigger page reclaim in alloc_contig_range() to stabilise watermarks Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: Marek Szyprowski Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-mm@kvack.org, linaro-mm-sig@lists.linaro.org, Ohad Ben-Cohen , Daniel Walker , Russell King , Arnd Bergmann , Jonathan Corbet , Mel Gorman , Michal Nazarewicz , Dave Hansen , Jesse Barker , Kyungmin Park , Andrew Morton , Rob Clark , KAMEZAWA Hiroyuki > +static int __reclaim_pages(struct zone *zone, gfp_t gfp_mask, int count) > +{ > + =A0 =A0 =A0 /* > + =A0 =A0 =A0 =A0* Increase level of watermarks to force kswapd do his jo= b > + =A0 =A0 =A0 =A0* to stabilise at new watermark level. > + =A0 =A0 =A0 =A0*/ > + =A0 =A0 =A0 __update_cma_watermarks(zone, count); > + > + =A0 =A0 =A0 /* Obey watermarks as if the page was being allocated */ > + =A0 =A0 =A0 watermark =3D low_wmark_pages(zone) + count; > + =A0 =A0 =A0 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@kvack.org. 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: email@kvack.org