From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx104.postini.com [74.125.245.104]) by kanga.kvack.org (Postfix) with SMTP id A8BEA6B004F for ; Mon, 5 Dec 2011 11:14:45 -0500 (EST) Date: Mon, 5 Dec 2011 17:14:43 +0100 From: Michal Hocko Subject: Re: Question about __zone_watermark_ok: why there is a "+ 1" in computing free_pages? Message-ID: <20111205161443.GA20663@tiehlicka.suse.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Wang Sheng-Hui Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mel Gorman , Andrew Morton On Fri 25-11-11 09:21:35, Wang Sheng-Hui wrote: > In line 1459, we have "free_pages -= (1 << order) + 1;". > Suppose allocating one 0-order page, here we'll get > free_pages -= 1 + 1 > I wonder why there is a "+ 1"? Good spot. Check the patch bellow. ---