Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp588326ybm; Wed, 27 May 2020 03:07:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyn9IDLh2X9c/VRLfPgbX6KKmzD7HVYWMpx+Ijb9K5khK7ZWudWmUftvqhUz8ZhWT25ic4e X-Received: by 2002:a17:906:34c3:: with SMTP id h3mr5159072ejb.446.1590574054762; Wed, 27 May 2020 03:07:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590574054; cv=none; d=google.com; s=arc-20160816; b=vExX7/bagoL9jHe5Bbsn6AV14QeS3MRxBg+WVWsQ8Rqg8hUMsANupqKXMgTLmnvSWI X0Dt7Mcvf50CW5he8/tT3VCmSaqNOr5Y+2HGa1RofBjkmCK7EOVOY2pokdlwlv152AfJ jf4lATiP5VYclvA8ff0NPYDdCOhIX//LcnTG/U/b+KHhvhNYjjvqO/dhQbIEJTrnJZqa gNgYYqKY67J56L06voR3RJaKUcLHakh1mKLTjQC4vpUZtr+4FAi3HswyYcjtYXKsnDs1 0YdrVWJwC+SjetcosBcBLfUFsBWU6t31hdpDx+7t9pJ6vyeeJR/GdwgbJPdH+iv72rJz 1tpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=XIhz9DXnj/A7mpbN2JONtLaO9sSOaKnu8Zni2kFEuPk=; b=eFKsPqLEwEE5gmKmZZpWSbNqvmiFKk26vgKHIT2wg1Lsq8/yMrnbNpF+VVsmqHgaT1 oOK7LjmnKbl2Fql4AlCK0aB5ukGeh+f9wPHbPRML1FAvY5ImYHDolA+dfqob+wV+Z0Tc aQvNXqFkRkDNWw7/FnVMYQYLyU5HQepz4TwjQXyloZYn99Mhaq5cQGj26qtlU1nxwFxc 8ujGkLYiN5XYaZQCTloD3Q+H7s9vzv/wla9tgagrLK+l7HV4yrqpg9NqxIvUaG1PTIGq jfhGzMSitbADpt6KFZ8JNllO7M8rqSKq3bzQI1Jve484VeW7GVyMxzfWC2BehQmqH4xU n0IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kIzf7gA5; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o25si1540290ejx.662.2020.05.27.03.07.11; Wed, 27 May 2020 03:07:34 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kIzf7gA5; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728882AbgE0Gp6 (ORCPT + 99 others); Wed, 27 May 2020 02:45:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725613AbgE0Gp4 (ORCPT ); Wed, 27 May 2020 02:45:56 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AFA3C061A0F for ; Tue, 26 May 2020 23:45:56 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id t11so11344313pgg.2 for ; Tue, 26 May 2020 23:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XIhz9DXnj/A7mpbN2JONtLaO9sSOaKnu8Zni2kFEuPk=; b=kIzf7gA5Eo3d4iL+VRC5D+X4qfCOcLA5PG0otOOWyHcD2sxBnWKmgeamtxTLENsrQv ZMXZRwcdWUdVKdc4w+dQ1DSpoEukbxZSQ5nvsThfqHxd0Et7acI6DrV4A2GXMa0aDHxx KBMthjaPzIEhxMjXtamW8olIjJ3XUbHwuyTfEozqXQOWSXrNfreGAkx0bPWF036CuGFK 4Ha2oMsG0wNcogLBglECzxi1K61VnUeGrUJN+y0Wd/mYoTeEVOUkRWxCuityvUjAerux zYwZ76vSwuvn3rZxBHaek0hmWco+zt/I84SX9rOQWHbydKt53oFdR6hF7zw/JPpg8xUc R88Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XIhz9DXnj/A7mpbN2JONtLaO9sSOaKnu8Zni2kFEuPk=; b=PWn9r1G1mPKdxXU2zrsdzAs8YPHbqSX7KI1aLzTIn5KbTklQwxTMcmCWKxgl99t309 /5M9t5LA3kTRGsjXIZG+yQfa9GwdAZcECMEld85rJWSbqtX7zFCbm9ExKKpYj0SZo1IQ G6AvPqq5lRAZVVwn9jbOc3i93lKsAXY9BiCt3r5S+9kW9q/rpXeamWHBsVu87Aj82VsY IWgzCCVv3SFVuqq8I53v855/DKQwOt0kOmpiMLBzxrypeDhifTm+CpRqqTEmT64jJATm kE4B7rcnAWaBbYa1adoHEAlG9CQ3UbxKLYNsro3bsMxHlAUE9Ib4pGlI6l8e28t8GeK3 IapA== X-Gm-Message-State: AOAM532XQ+oezSNMmPMNbTGifNCXut+JNHdN0A1fXbbGrNTgE2lHd3XO 3xouhiIRFSVZe1fXzoUxs1M= X-Received: by 2002:a62:75d7:: with SMTP id q206mr2519609pfc.172.1590561956128; Tue, 26 May 2020 23:45:56 -0700 (PDT) Received: from localhost.localdomain ([114.206.198.176]) by smtp.gmail.com with ESMTPSA id r13sm443883pgv.50.2020.05.26.23.45.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 May 2020 23:45:55 -0700 (PDT) From: js1304@gmail.com X-Google-Original-From: iamjoonsoo.kim@lge.com To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@lge.com, Vlastimil Babka , Christoph Hellwig , Roman Gushchin , Mike Kravetz , Naoya Horiguchi , Michal Hocko , Joonsoo Kim Subject: [PATCH v2 04/12] mm/hugetlb: use provided ac->gfp_mask for allocation Date: Wed, 27 May 2020 15:44:55 +0900 Message-Id: <1590561903-13186-5-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590561903-13186-1-git-send-email-iamjoonsoo.kim@lge.com> References: <1590561903-13186-1-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 From: Joonsoo Kim gfp_mask handling on alloc_huge_page_(node|nodemask) is slightly changed, from ASSIGN to OR. It's safe since caller of these functions doesn't pass extra gfp_mask except htlb_alloc_mask(). This is a preparation step for following patches. Signed-off-by: Joonsoo Kim --- mm/hugetlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 453ba94..dabe460 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1985,7 +1985,7 @@ struct page *alloc_huge_page_node(struct hstate *h, { struct page *page = NULL; - ac->gfp_mask = htlb_alloc_mask(h); + ac->gfp_mask |= htlb_alloc_mask(h); if (ac->nid != NUMA_NO_NODE) ac->gfp_mask |= __GFP_THISNODE; @@ -2004,7 +2004,7 @@ struct page *alloc_huge_page_node(struct hstate *h, struct page *alloc_huge_page_nodemask(struct hstate *h, struct alloc_control *ac) { - ac->gfp_mask = htlb_alloc_mask(h); + ac->gfp_mask |= htlb_alloc_mask(h); spin_lock(&hugetlb_lock); if (h->free_huge_pages - h->resv_huge_pages > 0) { -- 2.7.4