From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751874AbdFNOEy (ORCPT ); Wed, 14 Jun 2017 10:04:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:45158 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750756AbdFNOEx (ORCPT ); Wed, 14 Jun 2017 10:04:53 -0400 Date: Wed, 14 Jun 2017 16:04:50 +0200 From: Michal Hocko To: Vlastimil Babka Cc: linux-mm@kvack.org, Naoya Horiguchi , Mike Kravetz , Mel Gorman , Andrew Morton , LKML Subject: Re: [RFC PATCH 1/4] mm, hugetlb: unclutter hugetlb allocation layers Message-ID: <20170614140450.GQ6045@dhcp22.suse.cz> References: <20170613090039.14393-1-mhocko@kernel.org> <20170613090039.14393-2-mhocko@kernel.org> <1babcd50-a90e-a3e4-c45c-85b1b8b93171@suse.cz> <20170614134258.GP6045@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170614134258.GP6045@dhcp22.suse.cz> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 14-06-17 15:42:58, Michal Hocko wrote: > On Wed 14-06-17 15:18:26, Vlastimil Babka wrote: > > On 06/13/2017 11:00 AM, Michal Hocko wrote: > [...] > > > @@ -1717,13 +1640,22 @@ struct page *alloc_huge_page_node(struct hstate *h, int nid) > > > page = dequeue_huge_page_node(h, nid); > > > spin_unlock(&hugetlb_lock); > > > > > > - if (!page) > > > - page = __alloc_buddy_huge_page_no_mpol(h, nid); > > > + if (!page) { > > > + nodemask_t nmask; > > > + > > > + if (nid != NUMA_NO_NODE) { > > > + nmask = NODE_MASK_NONE; > > > + node_set(nid, nmask); > > > > TBH I don't like this hack too much, and would rather see __GFP_THISNODE > > involved, which picks a different (short) zonelist. Also it's allocating > > nodemask on stack, which we generally avoid? Although the callers > > currently seem to be shallow. > > Fair enough. That would require pulling gfp mask handling up the call > chain. This on top of this patch + refreshes for other patches later in > the series as they will conflict now? I've rebase the attempts/hugetlb-zonelists branch for an easier review. -- Michal Hocko SUSE Labs