Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp515243ybg; Tue, 9 Jun 2020 06:28:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygHFM3kr+lSumj+EbAmnY8+rb0luYQqQGYNpvHYPHtH/g1TSQU8b61MUDsprmPrxRrtd0/ X-Received: by 2002:a17:906:1f0d:: with SMTP id w13mr27083835ejj.0.1591709335904; Tue, 09 Jun 2020 06:28:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591709335; cv=none; d=google.com; s=arc-20160816; b=FMtAe4fuDYEOuDjEJ0m2/HqSWO8eu0Q0B5ncHxvEg5ZgKGQa5eVYkLfp1Yz3iVURR/ BH4FYegETf7YqbFY8k47W2f/oxgq8o6cQH7r6hq5vc/q7OBokc85ycD1r4YvjjcOv5rS YcdLdNHRobb8+GN6axMx68OZ8mnz5SXTMxw1Dw/Tir+XPf8ES9OdlnKn6cXbukyTv+HZ loVGJsHPwkM4rO2ttQ+FowtNxX7rO5+x5Qgz+0Vk6urcs0WhVrs+8gyem0iK3tz+e4Mj DpwrV9Se4iPe4yKhf/cX0oCBwT6aFxEoUa048RenyK5bjKhEhC7MgPtwk34MWOwc+gy1 RfqA== 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=duYAHWPnEvooNTZ1VvjKgdBmlQUETGmu9dtBpelWVLQ=; b=FMXPJZ5LS1qO3x8RYZyndB0BHYAyR7h1kB0JcpTu7GIvbMwhBSWCK50aG2hvDGCgUW rUsNIn930rnH/wfriFkr9njbQ/kxrtubmhz6b0Me3/+Fi32yDoogp7gtdazx9DXzgtJr 4Jw8zD4nsBhh+skWxFqoPpsMmK4Wvu1V6t7Zppvp/umcxYISVqvPWW+vU1SCl1AraXX7 6h7d6N5iAeuqFSU4t7I8xeXphS/lF1V8o8M4B0bfVRY95jKpEnUimXK6LtPUG8TEEKkP Ot0jEEtLevQnLy5fMA8QjB1Ml+n6p5kb5oUNjjRheRVj1rAHbbezgNLQuvS5KEfiodN8 gJyg== 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 z7si10631254edm.85.2020.06.09.06.28.32; Tue, 09 Jun 2020 06:28:55 -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 S1728970AbgFIN0e (ORCPT + 99 others); Tue, 9 Jun 2020 09:26:34 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:44483 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728601AbgFIN0d (ORCPT ); Tue, 9 Jun 2020 09:26:33 -0400 Received: by mail-ed1-f67.google.com with SMTP id l1so16334350ede.11 for ; Tue, 09 Jun 2020 06:26:31 -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=duYAHWPnEvooNTZ1VvjKgdBmlQUETGmu9dtBpelWVLQ=; b=Xb7xp3cx2p8SV9GWgG35gFWsfDWetvR1Y0uoSIdlXAQOMk8dWDtZlqUyj2qKeFF6IF NY3MhYQa886bEKcLcuWRSvYBvxj2NQpe3DNJzCe1Rj7nk174GgnRscux2Xtps1DL0Kws OPuTVN428suDDKuWTo8wkha0ds8QC9XVKeOWbUhTSNcGHQ5Fj08GmOQSEUmZWnVnn/fj 0WFlwkIiZ824uXsr9m1V6F0uKUhqB7ZLiDauXUtJMPJToNQJYoH5WsNXoxrw6cHHbbaF xVFYNuGR+iBdCPh4Dxk/hBUCzxYDLO3trdnkNwE1KA8F2GYEVRvkr9pU0WFT41a5No6I ZR+w== X-Gm-Message-State: AOAM533C2/lVdOA/sqta4x8P1hDvsrLwkvg8FjWTWyRL2guN3QHu7Z5m 2X5RldouawJhrxQg8dCZJNPebiXu X-Received: by 2002:a50:fd19:: with SMTP id i25mr26529489eds.248.1591709191061; Tue, 09 Jun 2020 06:26:31 -0700 (PDT) Received: from localhost (ip-37-188-174-195.eurotel.cz. [37.188.174.195]) by smtp.gmail.com with ESMTPSA id z15sm13602811ejw.8.2020.06.09.06.26.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 06:26:30 -0700 (PDT) Date: Tue, 9 Jun 2020 15:26:29 +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 04/12] mm/hugetlb: use provided ac->gfp_mask for allocation Message-ID: <20200609132629.GF22623@dhcp22.suse.cz> References: <1590561903-13186-1-git-send-email-iamjoonsoo.kim@lge.com> <1590561903-13186-5-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-5-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:55, Joonsoo Kim wrote: > 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. This patch on its own doesn't make much sense to me. Should it be folded in the patch which uses that? > 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 > -- Michal Hocko SUSE Labs