From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 838A3C2C8 for ; Mon, 10 Aug 2026 03:16:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=96.67.55.147 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786331804; cv=none; b=M2PxpW9UFas4Lnt7hCMofkqsCa9DFvZS+TfB8aGCUn4xbKTl4WoLk8/QM9mTiFapUpT4Ic7CSobgm0mrACl6u7JJ03BHKGUoCGiS6dlIgIfiGFFlkqm/Mq5u88BxsG9h5Z+774fFnRSB6ocSR1JoOa5p7ccxLFp3Rqlh4fmJAho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786331804; c=relaxed/simple; bh=DPDbH0uDy9khnXmwsHeDwlaELQ6SwGd2GWPEwSHHQbI=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=jBUUvZyRgQ30d9lEHQ/goNysktSUAM3YWx5yxh7UoSGkI5fDXDUWjMHVbVRdy+ihtxGO0IH2MLGPDLCov230aKoqpmnPxXrqnb7F1TE1G3rDBa/UbnUeGfGoq6Ab0P4cfCoP9vcvs1KtVs4mzFHdqEKgWLjT+0YET3pjK2diWfU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com; spf=pass smtp.mailfrom=surriel.com; dkim=pass (2048-bit key) header.d=surriel.com header.i=@surriel.com header.b=aoI+iny3; arc=none smtp.client-ip=96.67.55.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=surriel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=surriel.com header.i=@surriel.com header.b="aoI+iny3" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=surriel.com ; s=mail; h=MIME-Version:Content-Transfer-Encoding:Content-Type:References: In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=DPDbH0uDy9khnXmwsHeDwlaELQ6SwGd2GWPEwSHHQbI=; b=aoI+iny3FaGb3bAaDsa0/UBRlL O+VeMxmEN3Y7AStBqsGmtlZufMKqDGHw1GDrO+5YH78pdQTtig+r+YyoejMiAWy7hvOVH1GDOOHTZ r8dI/ON94AHdZ4wXn8r7ThiGGajXB1aFKLG9C1kIcLQmIHW46tSx09L198TGJ4vvUfTwbOUXH5C7H 9DZqZTat5WE+QjFhSRd811f47Y1n8lYUtwkVQxd7qGKH5gRJ1Iobfnvty7XbjPAMKycTUikFngCTl qNRfVaGaPlFjESwxpsUgqftbLTMrHYLdRTMI+WnwuHRAOiHtoMEVScLG7N4setaYuGr+Hl1n8PvSR Hu46WO2g==; Received: from [96.67.55.146] by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1wtGUx-000000002vh-25s0; Sun, 09 Aug 2026 23:16:23 -0400 Message-ID: <705e54c4cd6f49c930208e450cdf488e8e75cc21.camel@surriel.com> Subject: Re: [RFC PATCH] mm/cma: don't release CMA pages still in use From: Rik van Riel To: Andrew Morton Cc: David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Date: Sun, 09 Aug 2026 23:16:23 -0400 In-Reply-To: <20260809210608.06b5ccb9@fangorn> References: <20260809210608.06b5ccb9@fangorn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.60.2 (3.60.2-1.fc44) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Sun, 2026-08-09 at 21:06 -0400, Rik van Riel wrote: >=20 > This change should be safe because nothing can get reallocated while > it > is still in use. And of course Sashiko found something I overlooked. I'll spin a v2 tomorrow. https://sashiko.dev/#/patchset/20260809210608.06b5ccb9@fangorn The hugetlb CMA code uses order 9 as the smallest size that may be returned to the CMA allocator, which I suppose works because when mTHPs, THPs, and other movable large folios end up in the hugetlb CMA area, those do not go through the CMA allocator, and never touch the bitmap? That additional bitmap alongside of the pages and page blocks looks like trouble.