From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx177.postini.com [74.125.245.177]) by kanga.kvack.org (Postfix) with SMTP id A56C86B0031 for ; Tue, 6 Aug 2013 20:18:49 -0400 (EDT) Message-ID: <1375834724.2134.49.camel@buesod1.americas.hpqcorp.net> Subject: Re: [PATCH 17/18] mm, hugetlb: retry if we fail to allocate a hugepage with use_reserve From: Davidlohr Bueso Date: Tue, 06 Aug 2013 17:18:44 -0700 In-Reply-To: <20130805073647.GD27240@lge.com> References: <1375075929-6119-1-git-send-email-iamjoonsoo.kim@lge.com> <1375075929-6119-18-git-send-email-iamjoonsoo.kim@lge.com> <20130729072823.GD29970@voom.fritz.box> <20130731053753.GM2548@lge.com> <20130803104302.GC19115@voom.redhat.com> <20130805073647.GD27240@lge.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Joonsoo Kim Cc: David Gibson , Andrew Morton , Rik van Riel , Mel Gorman , Michal Hocko , "Aneesh Kumar K.V" , KAMEZAWA Hiroyuki , Hugh Dickins , Davidlohr Bueso , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wanpeng Li , Naoya Horiguchi , Hillf Danton On Mon, 2013-08-05 at 16:36 +0900, Joonsoo Kim wrote: > > Any mapping that doesn't use the reserved pool, not just > > MAP_NORESERVE. For example, if a process makes a MAP_PRIVATE mapping, > > then fork()s then the mapping is instantiated in the child, that will > > not draw from the reserved pool. > > > > > Should we ensure them to allocate the last hugepage? > > > They map a region with MAP_NORESERVE, so don't assume that their requests > > > always succeed. > > > > If the pages are available, people get cranky if it fails for no > > apparent reason, MAP_NORESERVE or not. They get especially cranky if > > it sometimes fails and sometimes doesn't due to a race condition. > > Hello, > > Hmm... Okay. I will try to implement another way to protect race condition. > Maybe it is the best to use a table mutex :) > Anyway, please give me a time, guys. So another option is to take the mutex table patchset for now as it *does* improve things a great deal, then, when ready, get rid of the instantiation lock all together. Thanks, Davidlohr -- 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/ . Don't email: email@kvack.org