Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753729Ab3HVGud (ORCPT ); Thu, 22 Aug 2013 02:50:33 -0400 Received: from LGEMRELSE7Q.lge.com ([156.147.1.151]:63870 "EHLO LGEMRELSE7Q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753614Ab3HVGuc (ORCPT ); Thu, 22 Aug 2013 02:50:32 -0400 X-AuditID: 9c930197-b7b44ae00000347f-7e-5215b4b63ad3 Date: Thu, 22 Aug 2013 15:50:38 +0900 From: Joonsoo Kim To: "Aneesh Kumar K.V" Cc: Andrew Morton , Rik van Riel , Mel Gorman , Michal Hocko , KAMEZAWA Hiroyuki , Hugh Dickins , Davidlohr Bueso , David Gibson , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wanpeng Li , Naoya Horiguchi , Hillf Danton Subject: Re: [PATCH v2 03/20] mm, hugetlb: fix subpool accounting handling Message-ID: <20130822065038.GA13415@lge.com> References: <1376040398-11212-1-git-send-email-iamjoonsoo.kim@lge.com> <1376040398-11212-4-git-send-email-iamjoonsoo.kim@lge.com> <87vc2zgzpn.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87vc2zgzpn.fsf@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1341 Lines: 42 Hello, Aneesh. First of all, thank you for review! On Wed, Aug 21, 2013 at 02:58:20PM +0530, Aneesh Kumar K.V wrote: > Joonsoo Kim writes: > > > If we alloc hugepage with avoid_reserve, we don't dequeue reserved one. > > So, we should check subpool counter when avoid_reserve. > > This patch implement it. > > Can you explain this better ? ie, if we don't have a reservation in the > area chg != 0. So why look at avoid_reserve. We don't consider avoid_reserve when chg != 0. Look at following code. + if (chg || avoid_reserve) + if (hugepage_subpool_get_pages(spool, 1)) It means that if chg != 0, we skip to check avoid_reserve. > > Also the code will become if you did > > if (!chg && avoid_reserve) > chg = 1; > > and then rest of the code will be able to handle the case. We still pass avoid_reserve to dequeue_huge_page_vma() and check avoid_reserve there, so maintaining avoid_reserve and checking it separately is better to understand a logic. And it doesn't matter at all since I eventually unify these in patch 13. Thanks. -- 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/