From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754570AbbCBNr0 (ORCPT ); Mon, 2 Mar 2015 08:47:26 -0500 Received: from cantor2.suse.de ([195.135.220.15]:59628 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752594AbbCBNrX (ORCPT ); Mon, 2 Mar 2015 08:47:23 -0500 Message-ID: <54F469E9.7050303@suse.cz> Date: Mon, 02 Mar 2015 14:47:21 +0100 From: Vlastimil Babka User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: David Rientjes , Andrew Morton CC: Christoph Lameter , Pekka Enberg , Joonsoo Kim , Johannes Weiner , Mel Gorman , Pravin Shelar , Jarno Rajahalme , Li Zefan , Greg Thelen , linux-kernel@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, cgroups@vger.kernel.org, dev@openvswitch.org Subject: Re: [patch v2 2/3] mm, thp: really limit transparent hugepage allocation to local node References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/27/2015 11:17 PM, David Rientjes wrote: > Commit 077fcf116c8c ("mm/thp: allocate transparent hugepages on local > node") restructured alloc_hugepage_vma() with the intent of only > allocating transparent hugepages locally when there was not an effective > interleave mempolicy. > > alloc_pages_exact_node() does not limit the allocation to the single > node, however, but rather prefers it. This is because __GFP_THISNODE is > not set which would cause the node-local nodemask to be passed. Without > it, only a nodemask that prefers the local node is passed. > > Fix this by passing __GFP_THISNODE and falling back to small pages when > the allocation fails. > > Commit 9f1b868a13ac ("mm: thp: khugepaged: add policy for finding target > node") suffers from a similar problem for khugepaged, which is also > fixed. > > Fixes: 077fcf116c8c ("mm/thp: allocate transparent hugepages on local node") > Fixes: 9f1b868a13ac ("mm: thp: khugepaged: add policy for finding target node") > Signed-off-by: David Rientjes Acked-by: Vlastimil Babka