From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754736AbbCCBbg (ORCPT ); Mon, 2 Mar 2015 20:31:36 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:41694 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753372AbbCCBbf (ORCPT ); Mon, 2 Mar 2015 20:31:35 -0500 Message-ID: <54F50EB1.5090102@oracle.com> Date: Mon, 02 Mar 2015 17:30:25 -0800 From: Mike Kravetz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Andrew Morton CC: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Nadia Yvette Chambers , Aneesh Kumar , Joonsoo Kim Subject: Re: [RFC 2/3] hugetlbfs: coordinate global and subpool reserve accounting References: <1425077893-18366-1-git-send-email-mike.kravetz@oracle.com> <1425077893-18366-4-git-send-email-mike.kravetz@oracle.com> <20150302151023.e40dd1c6a9bf3d29cb6b657c@linux-foundation.org> In-Reply-To: <20150302151023.e40dd1c6a9bf3d29cb6b657c@linux-foundation.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: acsinet22.oracle.com [141.146.126.238] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/02/2015 03:10 PM, Andrew Morton wrote: > On Fri, 27 Feb 2015 14:58:11 -0800 Mike Kravetz wrote: > >> If the pages for a subpool are reserved, then the reservations have >> already been accounted for in the global pool. Therefore, when >> requesting a new reservation (such as for a mapping) for the subpool >> do not count again in global pool. However, when actually allocating >> a page for the subpool decrement global reserve count to correspond to >> with decrement in global free pages. > > The last sentence made my brain hurt. > Sorry. I was trying to point out that the global free and reserve accounting is still the same when doing a page allocation, even though the entire size of the subpool was reserved. For example, when allocating a page the global free and reserve counts are both decremented. -- Mike Kravetz