Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1185653ybt; Tue, 7 Jul 2020 09:34:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmWClwh6bkoWbLsFPVX6Q4rTU2LTMYq67/Q/Svvens1Xc5Ilk0OPrM9Wq3lMDNpXU+e1PM X-Received: by 2002:aa7:c885:: with SMTP id p5mr48717323eds.100.1594139680439; Tue, 07 Jul 2020 09:34:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594139680; cv=none; d=google.com; s=arc-20160816; b=n49GeIrhMRjdbF1VUD6CUluugFjdh8Y0O42t5sH4tObFfenV5wVyqGrhNvI4C8pitT 1Rx209wygYaM+RMq8UJ21Hb/ChTIoH+9ppZsezR8JlWPqTnLx+21B1xYetuGFmmnvai3 de89rBC7CGJI8F4fR6zUcdYnogvpPEJcFRQzP8bCecGqoecrsfr/etlIocAWDwZNNcmf 6S1U3MjWS/hLNgRHvSXT2lTKrIvKfAPskqSb9tWfzJ2mCv5261fChuTux7GwGtrb0Cfc Z9s/sUsrXhhsgNbINYKkVElPRPY/7hoK1/xTIgg/pfIDF5X2Qkc4FqmWiSThBQyCRF8q bysg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=F99IerIQoEKTNwaHcSDpDayo+0+VG4ENE3pcTnPh0jU=; b=zKkfLyq17PiedqSGpd4Rns/0RkCGIGkB8O977t9MoWYszJka8y2AH+4LSqh+SHZFKu KUElUfU6gah9Y8keEm2NlabfqlaNBFVbPCGCvpMlWefodLcXL0XE1oE3ssbdBJB8kRDM Ziw7e+XLXHg1UbnNyfYwe1uaP0hZjautnuclZzncX2GkAnMe5JiQyrVOvmx+tgMX3KPf rkz1Up+VPgkDuBY9tu7aP/zPoONobiWOlg7q/y/6ftKIQomwumJZCzoDUspjpFF5Ljd/ tYY2plsKZ3fX8ZrDdFA84kt5lMRO5GI2T99tYLYztoxntDozrxx46lkxe8POoMOoaqLX 19kQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b19si17710379edj.598.2020.07.07.09.34.16; Tue, 07 Jul 2020 09:34:40 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728263AbgGGQeK (ORCPT + 99 others); Tue, 7 Jul 2020 12:34:10 -0400 Received: from mx2.suse.de ([195.135.220.15]:45578 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728073AbgGGQeJ (ORCPT ); Tue, 7 Jul 2020 12:34:09 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id D1906AC12; Tue, 7 Jul 2020 16:34:08 +0000 (UTC) Subject: Re: [PATCH v4 06/11] mm/migrate: make a standard migration target allocation function To: js1304@gmail.com, Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@lge.com, Christoph Hellwig , Roman Gushchin , Mike Kravetz , Naoya Horiguchi , Michal Hocko , Joonsoo Kim References: <1594107889-32228-1-git-send-email-iamjoonsoo.kim@lge.com> <1594107889-32228-7-git-send-email-iamjoonsoo.kim@lge.com> From: Vlastimil Babka Message-ID: <409b6e24-d143-a61c-95a3-1a55e1a6008e@suse.cz> Date: Tue, 7 Jul 2020 16:49:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <1594107889-32228-7-git-send-email-iamjoonsoo.kim@lge.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/7/20 9:44 AM, js1304@gmail.com wrote: > From: Joonsoo Kim > > There are some similar functions for migration target allocation. Since > there is no fundamental difference, it's better to keep just one rather > than keeping all variants. This patch implements base migration target > allocation function. In the following patches, variants will be converted > to use this function. > > Changes should be mechanical but there are some differences. First, Some > callers' nodemask is assgined to NULL since NULL nodemask will be > considered as all available nodes, that is, &node_states[N_MEMORY]. > Second, for hugetlb page allocation, gfp_mask is ORed since a user could > provide a gfp_mask from now on. I think that's wrong. See how htlb_alloc_mask() determines between GFP_HIGHUSER_MOVABLE and GFP_HIGHUSER, but then you OR it with __GFP_MOVABLE so it's always GFP_HIGHUSER_MOVABLE. Yeah, gfp_mask for hugeltb become exposed in new_page_nodemask() after v4 3/11 patch, but that doesn't mean we can start modifying it :/