Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6480674pxb; Wed, 17 Feb 2021 05:50:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnytdShrbMoZg5qU5iwu/fIGmg26wORuJL30y/cb3YGGaZDBGGZiGAku3Yq5EJFxDphb1A X-Received: by 2002:a17:906:4b02:: with SMTP id y2mr7655507eju.475.1613569853852; Wed, 17 Feb 2021 05:50:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613569853; cv=none; d=google.com; s=arc-20160816; b=krasR/PpcAOqP53bmgbcoPN5nEQ5MqRCc08Vc7sE2/G2AJOFiLwYkv6GtZykEfA4A9 hUCpgRjQN6N21bXgM/VwqLcc7jKEXaAPBRW6M2lKOJz9w7ru+m0snKjB6fAdHcCqUg/Q I0yEdRnJHpYJazbR+sL48nchaRKWBbEMFUfhSHfOy2DVQUztmjbqp+XaSq7hUCX4GMtg VzKg8KaA6POz5g/7wp18kS3D4YguzZvFEptpofoNKQVXrj2m9RkhJfdjtUFSnKPm1GyM 9BtZYXImIErZDt3+WRw5TvcqvcIlVD8oKtu6ls/kMBowWZf+HTCiJhGBkI3VNMJ5p0aU oEjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=D6+tC93MJ91ioYWxajrnlaD4DCN17uacD4sArssdd9o=; b=Dqk/6dXcon4/2PAATFO5KB8bnEWaqAGVucysG4dCteENEtIU7ztLGoeEyaby6zD9Lg QIvBPjlcrH1OtPN33N2WswCdnWIHJl3kS1BInhF2xsWDjusGGRKNvI7xnJYeDcv1hAHM NguGWlF1uOtjzySPH60lcoH8md/byjijSp+VuR040Ps98Vm1K2PGpOKtqtcviwPYX32N Gz+ozZsULokS6wOJU/PS10T4iDmW2n32hP7r4CuFackduKI5SDvWqAlq/HWLVmDK3RWq L9HVkQVaqafWCd8DPeRfglApkKnLboCdAlIRxNvXyNDv4XXBPUDqYg+Rs6zPmNpDYny3 1Ymg== 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 i8si1764073ejj.286.2021.02.17.05.50.29; Wed, 17 Feb 2021 05:50:53 -0800 (PST) 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 S233046AbhBQNn2 (ORCPT + 99 others); Wed, 17 Feb 2021 08:43:28 -0500 Received: from mx2.suse.de ([195.135.220.15]:46016 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233401AbhBQNnJ (ORCPT ); Wed, 17 Feb 2021 08:43:09 -0500 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 55C69B75E; Wed, 17 Feb 2021 13:42:28 +0000 (UTC) Date: Wed, 17 Feb 2021 14:42:26 +0100 From: Oscar Salvador To: Michal Hocko Cc: Andrew Morton , Mike Kravetz , David Hildenbrand , Muchun Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] mm: Make alloc_contig_range handle free hugetlb pages Message-ID: <20210217134221.GA32488@linux> References: <20210217100816.28860-1-osalvador@suse.de> <20210217100816.28860-2-osalvador@suse.de> 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 17, 2021 at 02:30:43PM +0100, Michal Hocko wrote: > On Wed 17-02-21 11:08:15, Oscar Salvador wrote: > I do not think fallback to a different zone is ok. If yes then this > really requires a very good reasoning. alloc_contig_range is an > optimistic allocation interface at best and it shouldn't break carefully > node aware preallocation done by administrator. Yeah, previous version (RFC) was more careful with that. I somehow thought that it might be ok to fallback to other nodes in case we failed to allocate on the preferred nid. I will get RFC handling back wrt. allocation once I gather more feedback. > > > Note that gigantic hugetlb pages are fenced off since there is a cyclic > > dependency between them and alloc_contig_range. > > Why do we need/want to do all this in the first place? When trying to allocate a memory chunk with alloc_contig_range, it will fail if it ever sees a Hugetlb page because isolate_migratepages_range() does not "recognize" those for migration (or to put it different, does not know about them). Given that HugeTLB pages can be migrated or dissolved if free, it makes sense to enable isolate_migratepages_range() to recognize HugeTLB pages in order to handle them, as it currently does with LRU and Movable pages. -- Oscar Salvador SUSE L3