Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp756379ybg; Tue, 9 Jun 2020 12:01:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMypA55wg4RHW6daBGRBdqSkseE0lCM2oSkNPmYDIYCO5kH0+fpLfZiGXpDfSQLQInBDwk X-Received: by 2002:a17:906:799:: with SMTP id l25mr26573096ejc.234.1591729290242; Tue, 09 Jun 2020 12:01:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591729290; cv=none; d=google.com; s=arc-20160816; b=iOf8A97z+ooObvoi5C6S0BbFa1e5q0YOggvz10x+WMAa8JOUgomhesKlEpeSfL1tA/ u3oC8GfY1lrw1GUS8g86GO2P0zo0NyO56T0wWoyrNiG5vcGk+i5rjbpnN1lLQjwS7eNG Ihpjc2Gr9RDlZjdJt0vwCcjuKUumeISP+jjBPB7dHhJOBQTNM0O/lg6s1IGprOSc0efh eB/jvGaoR7NX0n5dFx1l4dy3aiGfVfWVFHrZevUyV30ybLo3HCYOd3NkvoJ6IBjdp206 sANlf5rhiwgybopJIuo1/2Ubeqz8FRBS9czeCodXdcq/fICbM76fvR4TcFQPg8IVnzIJ 77Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=tDta39kY0KD/UCX5IqkzMlRDHf+tP30+naJxD+kt06Q=; b=GsBAIr7hcWOplMIwvUaQ4D0KIJ8TTxEsnwRRnHHRs7HKj4CWKdPDdlbTHxgNP+F4NB fHKu+8lJbc2mULpY+GZrK5IGSVJqrZXk+U1D0DaWH4pa9DyxItlgj3j3a1nlPi2cG4UO dZvd2ktTRTsZ9KT0nvWRO6hcQsJtPHkk75zWCzB3CffGwpcBlabA0VWH8Z6ue4tPrYNM CYFZeHFw7M8wH6kjv0DlOtBupsfDRRVdVV0LhOY8k1If8RimHriLcY2kFXi1ilRWbKxB 85uIsFClhTkmml9O2Asokd3GCadxkQGoYt9V7ijSp5oRdC8SVygyW48JNFSkeKsIujZs u4Gg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lj6si11022890ejb.108.2020.06.09.12.01.06; Tue, 09 Jun 2020 12:01:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730134AbgFINnw (ORCPT + 99 others); Tue, 9 Jun 2020 09:43:52 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:41793 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729978AbgFINnO (ORCPT ); Tue, 9 Jun 2020 09:43:14 -0400 Received: by mail-ed1-f66.google.com with SMTP id m32so11213780ede.8 for ; Tue, 09 Jun 2020 06:43:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=tDta39kY0KD/UCX5IqkzMlRDHf+tP30+naJxD+kt06Q=; b=B1MCoX4cMa4VK1neEoo426lhQrEbZwrP3x/8aOLaKzJJvw0XoLFmmnw38bNrgsOavg XW+Vf2j59qy9CTakpQgHe0CcVGXuF7LbK41MSKnQLvt7BO31nzxwpAatM9aqAWW+qEi8 8QpVZ900H2KNBOcfvjbEtpNOMOERR52maKx205ibgtbR8zMpR1h2nwvG0ehG9rUF5J0s S6LG4nSOngC08GVk+eP5vVRZOfswZuaNgnPzFPTkgqx1GnFW19wvbu50Pz+Lta5r1tKB AovRg7ExZlPnlrRd5I7YbPoL1gHUHGCw52lUOIgyHwbIoghFsf2qfPPT1bLOWoUMqJDN HcxQ== X-Gm-Message-State: AOAM533gpg4lTpfIC+FejQxyMkWcC2Vlem2h7hRHcZzDPpGoQwGHOp+Q hYEopHBOqmVplfPjq4Pprns= X-Received: by 2002:aa7:c2c7:: with SMTP id m7mr26587825edp.148.1591710192306; Tue, 09 Jun 2020 06:43:12 -0700 (PDT) Received: from localhost (ip-37-188-174-195.eurotel.cz. [37.188.174.195]) by smtp.gmail.com with ESMTPSA id q14sm15832047edj.47.2020.06.09.06.43.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 06:43:11 -0700 (PDT) Date: Tue, 9 Jun 2020 15:43:09 +0200 From: Michal Hocko To: js1304@gmail.com Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@lge.com, Vlastimil Babka , Christoph Hellwig , Roman Gushchin , Mike Kravetz , Naoya Horiguchi , Joonsoo Kim Subject: Re: [PATCH v2 05/12] mm/hugetlb: unify hugetlb migration callback function Message-ID: <20200609134309.GG22623@dhcp22.suse.cz> References: <1590561903-13186-1-git-send-email-iamjoonsoo.kim@lge.com> <1590561903-13186-6-git-send-email-iamjoonsoo.kim@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1590561903-13186-6-git-send-email-iamjoonsoo.kim@lge.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 27-05-20 15:44:56, Joonsoo Kim wrote: [...] > -/* page migration callback function */ > struct page *alloc_huge_page_nodemask(struct hstate *h, > struct alloc_control *ac) > { > ac->gfp_mask |= htlb_alloc_mask(h); > + if (ac->nid == NUMA_NO_NODE) > + ac->gfp_mask &= ~__GFP_THISNODE; Is this really needed? alloc_huge_page_node is currently only called from numa migration code and the target node should be always defined. > > spin_lock(&hugetlb_lock); > if (h->free_huge_pages - h->resv_huge_pages > 0) { > diff --git a/mm/mempolicy.c b/mm/mempolicy.c > index 3b6b551..e705efd 100644 > --- a/mm/mempolicy.c > +++ b/mm/mempolicy.c > @@ -1073,9 +1073,10 @@ struct page *alloc_new_node_page(struct page *page, unsigned long node) > struct alloc_control ac = { > .nid = node, > .nmask = NULL, > + .gfp_mask = __GFP_THISNODE, > }; > > - return alloc_huge_page_node(h, &ac); > + return alloc_huge_page_nodemask(h, &ac); > } else if (PageTransHuge(page)) { > struct page *thp; > > -- > 2.7.4 > -- Michal Hocko SUSE Labs