From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69AA3126C02 for ; Thu, 18 Dec 2025 21:32:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766093568; cv=none; b=oDuZpiIoBONHC/tBDGAkgt5DZEj/HJcpE4fkv4JbpfPQ31M57yoR2qQARzTuOSPUeHuIoO6wrOTwFs42pt+9Bvw1RswZtjW8zhu9TW5SJXEGZDMVG+QgotQyAXnDV54xgs1Agsww5wWzWaxcpke2nLsAr2SKJuIUw2rd6B5aiEA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766093568; c=relaxed/simple; bh=Aihl2s8m6j5RLukLBz908/yTvTWTu5MskEyQWkQ9A8M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BU4J67UFhXgSbOmOEgSI9gbJtoYCTQNEQ2uZkwacW3Lz2Ice58XnBjy18l+VjkjyIquTDqtxDGWg29urexl1iNajUfZvcpLk/PMLm7alAjbBDVM2KgDt4tkyZ8vXExf2FyK056Qd9k43DdHcnUSnucLX7PGCeiP0N4/9s6UDras= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=YYw7+DeR; arc=none smtp.client-ip=209.85.160.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="YYw7+DeR" Received: by mail-qt1-f181.google.com with SMTP id d75a77b69052e-4eda6c385c0so8243721cf.3 for ; Thu, 18 Dec 2025 13:32:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1766093565; x=1766698365; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ZsqS8JZLvUNfWXbK6I+0m1K85/BN0I9qut0vlrzqpz0=; b=YYw7+DeR05Yw7UuVpAeN0RfgaNOz/26DZBaybzZLn2fnCdt3PunkPvc0U1FYnz1eqC 83aEF2zpD+T4YsHMwvFc4v2IPgIyu3sH8oSgzCPaCFopMC56RFaTL6NPSiyv8YzAcEWa Q1RQCowy9RLb688JYsnTBRq6atDcx8XHtnmXbt/9YHwi0mZk1TGdJhMLOsEz7PQS53dL RIWC1iahZJH2xOAZmQF1Y9UWcOGFh1dtL0BziRfO2Xvu/+QgTJ9lQmuxAYTBmUWpljxW 51hL+kaNXBb8c7suyEzoBdpNpBCCV8P5UFOLb5mDHBvO50+9lxOnOlL7LHvh2wEfSKYl 6NzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766093565; x=1766698365; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZsqS8JZLvUNfWXbK6I+0m1K85/BN0I9qut0vlrzqpz0=; b=YA+8OdDvPkg9v4FaCGUXH9TZKO4vd9Eqrxt+Gml2KbpYjFKlPu1l+ujqxAdgnCfFs4 xT7J3frBsJaRRmxk6pP7CZL7st7XEEltbbBBfrfG7epOSAV1Et3l8jfIJuYfoAgHjlnl pX2iMnQh7IOTtCArzge4xlyvlOiXgZZLkXDlzmNpGYHZQM2ZH/IJ2OrRRy/XhnoyHylT u9GbcOieoccGIfeUnyb8A+wjN8nU4RPJiaoM9HcKWpf6pcMypK2WYHtVcK3viMPryMTK C1+KLoiVOtez+Us6xiph9CAh73rt9zr+ZS2nAZgcXkWEjjHt+sTavx3O/j0zwLVsbufu gMfA== X-Forwarded-Encrypted: i=1; AJvYcCXm/WHf71yI2c5yAsof2JyypFmxbacEEahVoftCOvYv/X2Kq11bJZiMFFwQDVlpYRdqoCGrzTAPP0x5dp8=@vger.kernel.org X-Gm-Message-State: AOJu0YwrnbPi8aVgHgNUX+S3PBPikhfDxbY7ykRsr5T+r4nwjP4t1cHU aaJOn3bVGC21buR3lPOH222OdPJysiI5mn/gdBfVhv04dNAsUl7V+NLzJq2R6LKZ+9A= X-Gm-Gg: AY/fxX6fsTNFgSKMDxhkBBLFREkQ8Bi2A1NeNVx5DX32X96dAHesDNhdG1IMDLjAdpC B+Ilhw3K9OBo4MuinIu3AljYOpKxwBuA2uerJyrnAIyXMQwx839PKruFZqko5N8hkE92aO2pgvZ nP6glqOPTqXq9Bw821LIO1GKxkidivOOQ3ra3GuJ+fQ+bVJPcEuhuBUDv5tWryMnHP/ztq1kKOE B6T/ynqzxReKctGcKeGl4mbwOKDwxnLYyyst0Fni+9otO+Hp7wy6Ke6gLgIy6hcYaNjOfxsOdmm 4sPHIMOqiqq/F5ScQb4u2CDaYNW/0+11zFvLWrjPpX2niitB4DZdwEyXyijVNL0KLz4F0TpJLSx 0PFXhzy1vTjI32kqA1PqpKrqtnpFvtIuBiAMLy3fPhLcAaOjhTdpAZe7USVTKdIm0W4YL7fhCgl CF1OdC5nj5O5dixLiG+6NtahD/OK/zE/pwxD5egcRZQem18/OZwCmvegRUXb2i/fNQ4bskqg== X-Google-Smtp-Source: AGHT+IHQzlqcCj9rb7vPUeyaWJGb8K4sNNB0JRSVczQHlPtEzp0q6mfpj4aeVQ4wRucPM8HXHJiWKw== X-Received: by 2002:a05:622a:130e:b0:4ee:49b8:fb81 with SMTP id d75a77b69052e-4f4abdbd1efmr10764031cf.61.1766093565470; Thu, 18 Dec 2025 13:32:45 -0800 (PST) Received: from gourry-fedora-PF4VCD3F (pool-96-255-20-138.washdc.ftas.verizon.net. [96.255.20.138]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4f4ac531fa8sm2536081cf.4.2025.12.18.13.32.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Dec 2025 13:32:45 -0800 (PST) Date: Thu, 18 Dec 2025 16:32:07 -0500 From: Gregory Price To: Zi Yan Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, akpm@linux-foundation.org, vbabka@suse.cz, surenb@google.com, mhocko@suse.com, jackmanb@google.com, hannes@cmpxchg.org, richard.weiyang@gmail.com, osalvador@suse.de, rientjes@google.com, david@redhat.com, joshua.hahnjy@gmail.com, fvdl@google.com Subject: Re: [PATCH v5] page_alloc: allow migration of smaller hugepages during contig_alloc Message-ID: References: <20251218190832.1319797-1-gourry@gourry.net> <0E77F151-99B0-4F67-814A-4D79439C9A88@nvidia.com> <01A47A14-3B5F-408B-AC37-64E36AFCF14C@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01A47A14-3B5F-408B-AC37-64E36AFCF14C@nvidia.com> On Thu, Dec 18, 2025 at 04:17:14PM -0500, Zi Yan wrote: > On 18 Dec 2025, at 15:42, Gregory Price wrote: > > OK, you assume hugetlb is harder to migrate compared to other movable pages. > Considering the limited number of hugetlb pages, it is quite possible. > Anyway, I will wait for your v6. Thank you for the explanation and the > prototype below. > They are harder - a migration starts with an allocation. Contiguous allocations may then cause more migrations. We can end back up in similar style search/migrate code. Basically this can go some amount of recursive (though not much in practice). We at least guarantee termination because we guarantee we won't attempt to move pages of the same size or larger than the current allocation. ~Gregory