Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3369438imu; Mon, 10 Dec 2018 00:36:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xhsq+WhQ7nvdyKJtMYigOuSV2tKubFYIX4KBhG5hKCdq11BLSpBsOJmJJEfrWbJPheRHcr X-Received: by 2002:a62:6ec8:: with SMTP id j191mr11538047pfc.198.1544430993480; Mon, 10 Dec 2018 00:36:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544430993; cv=none; d=google.com; s=arc-20160816; b=zRZrPx9WafUa3AhMGB2Fu5NvWnh2r9rGJ64gQgSZt9LqA2F/t3DzFRDpRjquLHiKCi MAp19rvZ2vSqcfQyA/SDzCayggd/uR0fkuDExb2EYJBjcCxp9p0gQrgzv9YtzwMyOXMg c0wytFyAfi3o/yUvq9d+9mD974HeESKonM56GOA8ciALLYzBCJhec8hPo9P1fXLIlwvr yzKh0QVCeIUN80+JpzFsIPJKNIzcRdTieZNNEIdvDAZRT301G598KTrVQ0JhClKw18Ke aYAZYhLn8DIaug/WOpolZJt1P2IfmOqEPvIxw2vEN05pNNMHPBn8pArp2CSsicxylrIz enCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=KJ/WAnD6cUDhQIAFbjdx3n4p20p9LD/tVF42tx7Hs4Y=; b=mB191ISuKxbvjEMC0pixtMyxN/c4vQfMxGePGpsyjgEjSj3g6vNTT6MqBlAV+4UfGT /4oJCqHEq6BOtCwIc7QhDruci8SCvcBB6VO4Lt2eMCZIAHGGfFcUiHqTYFExbK5YMT6U S9zOI7JGddu+tq8wr1754bKpdP7DTQaeyAkBigqozQmbJ/WWl2XrCxKVnHjYgQfWo+np adm/NFbnlql1sOVBTsoq5xPy2kvHQFZP9iSwlvERdwuZhNro4i32jccHUG/7r2USNAyE BK0feAwbr3z18yNClId0Bgllg6mVXrQm6t8BsESIDkUqvUtNhZgOR7Nmjb9yj3QKzE/4 lmGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p23si8943560pgk.312.2018.12.10.00.36.18; Mon, 10 Dec 2018 00:36:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726606AbeLJIeM (ORCPT + 99 others); Mon, 10 Dec 2018 03:34:12 -0500 Received: from mx2.suse.de ([195.135.220.15]:53560 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726029AbeLJIeM (ORCPT ); Mon, 10 Dec 2018 03:34:12 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E81F5AD75; Mon, 10 Dec 2018 08:34:09 +0000 (UTC) Date: Mon, 10 Dec 2018 09:34:09 +0100 From: Michal Hocko To: David Rientjes Cc: Linus Torvalds , Andrea Arcangeli , mgorman@techsingularity.net, Vlastimil Babka , ying.huang@intel.com, s.priebe@profihost.ag, Linux List Kernel Mailing , alex.williamson@redhat.com, lkp@01.org, kirill@shutemov.name, Andrew Morton , zi.yan@cs.rutgers.edu Subject: Re: [patch for-4.20] Revert "mm, thp: consolidate THP gfp handling into alloc_hugepage_direct_gfpmask" Message-ID: <20181210083409.GJ1286@dhcp22.suse.cz> References: <20181207080515.GT1286@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 07-12-18 15:05:28, David Rientjes wrote: > On Fri, 7 Dec 2018, Michal Hocko wrote: [...] > > > Secondly, prior to 89c83fb539f9, alloc_pages_vma() implemented a somewhat > > > different policy for hugepage allocations, which were allocated through > > > alloc_hugepage_vma(). For hugepage allocations, if the allocating > > > process's node is in the set of allowed nodes, allocate with > > > __GFP_THISNODE for that node (for MPOL_PREFERRED, use that node with > > > __GFP_THISNODE instead). > > > > Why is it wrong to fallback to an explicitly configured mbind mask? > > > > The new_page() case is similar to the shmem_alloc_hugepage() case. Prior > to 89c83fb539f9 ("mm, thp: consolidate THP gfp handling into > alloc_hugepage_direct_gfpmask"), shmem_alloc_hugepage() did > alloc_pages_vma() with hugepage == true, which effected a different > allocation policy: if the node current is running on is allowed by the > policy, use __GFP_THISNODE (considering ac5b2c18911ff is reverted, which > it is in Linus's tree). > > After 89c83fb539f9, we lose that and can fallback to remote memory. Since > the discussion is on-going wrt the NUMA aspects of hugepage allocations, > it's better to have a stable 4.20 tree while that is being worked out and > likely deserves separate patches for both new_page() and > shmem_alloc_hugepage(). For the latter specifically, I assume it would be > nice to get an Acked-by by Kirill who implemented shmem_alloc_hugepage() > with hugepage == true back in 4.8 that also had the __GFP_THISNODE > behavior before the allocation policy is suddenly changed. This should be a part of the changelog. -- Michal Hocko SUSE Labs