From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 53267317143 for ; Mon, 25 May 2026 17:19:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779729585; cv=none; b=PlOWmcwe0mZWQE8iQxIiF+9GdqA9psSMquJQo5ub01uh2YMFkRKasMqX5Gko3Ht6k2hcix9DEL/SamJQlNzEOd97ZuZ8XkisGX/effIWPBTH2PEukmZgfbitb/LGoTiisbL1yHACOgwT5fkdlystHKG63bdxxx12+bO8iyYWKnc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779729585; c=relaxed/simple; bh=uWrTpb78RDMzadpJpekYB0yddrgJ/RggqrAXwa6cmTo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MNlZ5XL1uISSadrIDM2MyMzlWuiyVw5nilarMB9yjALo1HvajIA0BYnBDM+1PEM+scfAqNSbY7GFMVkCFrKO6ViUoDhwSM8GcZIZC8TU3Jk55sfr+A35/YHIY4IVbj9quXWczlRy74AEyQAan7gnTqt48eIdQRyH+Ec6DnIimjc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dvQBosqH; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dvQBosqH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E21B31F000E9; Mon, 25 May 2026 17:19:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779729583; bh=wu0JytchWi892cy9Rbe8Jo63tHJaQJzkGdnUYJHGi5M=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=dvQBosqHNOOqzeyxIGbT+uY3fnEI2sBSVY+Fw1Z+kdR0F4bUiCfscUkDYq/sZhe9V nVZsqXRIXK2/WnH/OaWD6ulApKmgoiFEITCjt1BP3xR6rjdRzHF3fljRYtYLEEOvJw RtLOazVjgIFAu9DE95fN7v9WEophxyqhbSelwTraQ8uG8WZyQtw8XWxfDys40L10W+ dqVAw00+UNPrRVC82gJUh6pYAGSiZOj+NvPmNDNlAprtsmpWJdk2MKj9wyAzA79ZYi XRyUssQNB9GRKHAsMtOXMISDpslXxRp/vdLqcPqYh8mA6t5imwPj19jO0nlBzbK2mw kXYUk+Ovr6dQg== Date: Mon, 25 May 2026 19:19:33 +0200 From: "Oscar Salvador (SUSE)" To: Muchun Song Cc: Andrew Morton , David Hildenbrand , Muchun Song , Oscar Salvador , Michael Ellerman , Madhavan Srinivasan , Lorenzo Stoakes , "Liam R . Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Nicholas Piggin , Christophe Leroy , Ackerley Tng , Frank van der Linden , aneesh.kumar@linux.ibm.com, joao.m.martins@oracle.com, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 12/69] mm/hugetlb_cma: Validate hugetlb CMA range by zone at reserve time Message-ID: References: <20260513130542.35604-1-songmuchun@bytedance.com> <20260513130542.35604-13-songmuchun@bytedance.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: <20260513130542.35604-13-songmuchun@bytedance.com> On Wed, May 13, 2026 at 09:04:40PM +0800, Muchun Song wrote: > Hugetlb CMA allocation currently has to cope with CMA areas that span > multiple zones. > > Validate the reserved CMA range up front in hugetlb_cma_reserve() so > later hugetlb CMA allocations can assume a zone-consistent area. > > Also drop the pfn_valid() check from cma_validate_zones(). mem_section > is not fully initialized at this point, so the check can trigger false > warnings. Keep the sanity check in cma_activate_area() instead. > > Acked-by: Mike Rapoport (Microsoft) > Signed-off-by: Muchun Song Reviewed-by: Oscar Salvador (SUSE) -- Oscar Salvador SUSE Labs