From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) (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 EA9AF2D94AF for ; Wed, 3 Dec 2025 21:50:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764798658; cv=none; b=GiIydHZlFidH2GbvLVnohthDs1uMWnX0UIcX4VryUkVUHvtNDYBQ+U3yEQn+x9sQy+dGT5FLq0zHz2TdujCr5oNzO7MyjKdjvO5dvdARy7t8fRsp1iUtGaXA2CZzk3NQIC//KZORIDutJeH2LDtZsj8ihByB+oCtr4tBE1JuECc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764798658; c=relaxed/simple; bh=JHGfDUlew2CsaKlG5OfBOmRmtuZxeRpVwjd7Xi1XEPI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TnMLny6ERNOFCpoXJfVdyFjGvH2IrvulrUj90Sw1ho4tEgzopf8vKiPYpepId1MzXkyKnnjFFnmqOprVzb2inkGfjIORsUjo7WCNk9bDajr/brQjjsA/qyprOm6UuOVg6rbzVSakEdu0Z/mSq6xxA58cBiODR/aLWhTTGSFHtkc= 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=a2+R7bKC; arc=none smtp.client-ip=209.85.219.54 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="a2+R7bKC" Received: by mail-qv1-f54.google.com with SMTP id 6a1803df08f44-88246676008so1868236d6.3 for ; Wed, 03 Dec 2025 13:50:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1764798656; x=1765403456; 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=u1L7bCsctlFH/rlCsw/yhcu41+Ux43nXuWYzbJSS1oM=; b=a2+R7bKCE2nkA0crp7a03nbUvz5d3llE3TTDCihjXmuS61A5e7v7n5UNdxjRpJpAXt 8b4DYiHNkteYuPQFi21IQXV/LtwfRt9GjP4pAyziFNJ4CyneBdidNhwlwHWXK3I50efF dW+eyibzpUBjKs7jPAycoFXgSbYFGGuyxrHdi56IagSmIkho6Fa5TQhXA579ztB1lvk4 L3u4rRwLbyy9qUUCy6J9vQUGFfecLnTTaHln/6kuJcCeaoFcuNTNjj+e4NNX3BtI9iRc x5vgZSQ/UVaCd19kv44jPMdkMMb93mVx1dJsI6HSy41WsGVnNNMf1YguOlyN67jFRvLB Cx7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764798656; x=1765403456; 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=u1L7bCsctlFH/rlCsw/yhcu41+Ux43nXuWYzbJSS1oM=; b=OKNL8AaGL4RvVTbj4wGX8iYs1dc4kVRIe/lmWQdw57oqTUm3ar88LfEbmRxtGGd/cq 8bHjU5BjdpUAwcXmDsqxqju9fkJvNQRrvNyfz+Sk35CT2e/LZ716b5d6mqM6GRagUb8N Yrzg8CxCOb/QqPJCpOOEXSrDlwhxEktdYE8LKvv2dhJuuLBy0od3QSZQyS4uebiLqBJI dfKr7OkYvVVsMrrU1ID9nUCo7bX7ccEpbMwoyruvVk3EeCF2x9mZmR9f1x1C9fCdL5Zx e1cA6TGtrKDbMhMWQDLkxR7EWXMOghTwNagOuzFLdQLd5HuRyQNMaSq9AR0+N53qNE9u RagQ== X-Forwarded-Encrypted: i=1; AJvYcCWQSj8kQgmgIgBamvfN1US0XWln8N92A6SeVoV+KrHYDjdwxqkM7S978B1ZsmfWuoggdGXHDXmC5ZXfQ8o=@vger.kernel.org X-Gm-Message-State: AOJu0YyergtZ+14poNDJIJJt5XY1oOhPI7bxhnAV4cRu5DUCgLiWjyLa y6dTvOEDY5RFWaS2sueXpnXtvGM6Eg5bxAyN8yHmFENC/P8q4r4QNYMThYqOdhA0Bc0= X-Gm-Gg: ASbGncut/SH6CvPL1+mFRkyztf8XAIKuWqMQ+KqPocHyipM15sYh5QWg5a/OOlDivpF 6oYPB8c+eCu7MwAVzx/w7LQjEvDjwzMUFkdUh6tiKsdxQY/iZlLDzsSfbsFHnmMmbxpVD2a+b7m O/SvXsatkeOgAMzn9flrsaKLyRYx//fyHM2Q6XtgLD5LwBQ4UOCfPe05V2cjyQEadYWZDUwZh9f HEoCdn6uCQlI/DxDB99XhaisT+2dyGjjmE+RE/qcRGFEaEx/Z4+Hjb2UwZw+Tg/2F7vlyUsVVpH f55sdHgcWxhDEhUWe0Y0/4b2GJXBWEW/uuka691KNbWLPP1a1z1gCzXwkpUvIkmdYnlgfL9cIXK Qa8VjLeF9FMXsRsAZF6j3yGsJPGbE/+EDXIMRKuYMNnovnAcNSMmL9gbmAM4I0SKN1EYR1hB3cD Z8WojqCkr01q/KIadcUPn0dXitKR8= X-Google-Smtp-Source: AGHT+IEwceVsLeU5TI95jujZXB37aK5lP0n1gzmGLbDcAQSJh4iH2YFhpUVYfybMssUZm1JTFXzafQ== X-Received: by 2002:a05:6214:500d:b0:880:5389:a77a with SMTP id 6a1803df08f44-888195726c6mr64755976d6.63.1764798655692; Wed, 03 Dec 2025 13:50:55 -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 6a1803df08f44-886524fd33fsm134692766d6.24.2025.12.03.13.50.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 13:50:53 -0800 (PST) Date: Wed, 3 Dec 2025 16:50:52 -0500 From: Gregory Price To: "David Hildenbrand (Red Hat)" Cc: Frank van der Linden , Johannes Weiner , linux-mm@kvack.org, kernel-team@meta.com, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, vbabka@suse.cz, surenb@google.com, mhocko@suse.com, jackmanb@google.com, ziy@nvidia.com, kas@kernel.org, dave.hansen@linux.intel.com, rick.p.edgecombe@intel.com, muchun.song@linux.dev, osalvador@suse.de, x86@kernel.org, linux-coco@lists.linux.dev, kvm@vger.kernel.org, Wei Yang , David Rientjes , Joshua Hahn Subject: Re: [PATCH v4] page_alloc: allow migration of smaller hugepages during contig_alloc Message-ID: References: <20251203063004.185182-1-gourry@gourry.net> <20251203173209.GA478168@cmpxchg.org> 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: On Wed, Dec 03, 2025 at 09:14:44PM +0100, David Hildenbrand (Red Hat) wrote: > On 12/3/25 21:09, Gregory Price wrote: > > On Wed, Dec 03, 2025 at 08:43:29PM +0100, David Hildenbrand (Red Hat) wrote: > > > On 12/3/25 19:01, Frank van der Linden wrote: > > > > Worth noting that because this check really only applies to gigantic > > page *reservation* (not faulting), this isn't necessarily incurred in a > > time critical path. So, maybe i'm biased here, the reliability increase > > feels like a win even if the operation can take a very long time under > > memory pressure scenarios (which seems like an outliar anyway). > > Not sure I understand correctly. I think the fix from Mel was the right > thing to do. > > It does not make sense to try migrating a 1GB page when allocating a 1GB > page. Ever. > Oh yeah I agree, this patch doesn't allow that either. I was just saying his patch's restriction of omitting all HugeTLB (including 2MB) was more aggressive than needed. I.e. allowing movement of 2MB pages to increase reliability is (arguably) worth the potential long-runtime that doing so may produce (because we no longer filter out regions with 2MB pages). tl;dr: just re-iterating the theory of this patch. ~Gregory