Re: Question about __zone_watermark_ok: why there is a "+ 1" incomputing free_pages?

From: Michal Hocko
Date: Mon Dec 05 2011 - 11:14:45 EST


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