From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 699D92BE03C for ; Thu, 16 Apr 2026 16:13:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776355994; cv=none; b=M8Z4beLdivRiEYGy9DpVU99QAWtkqqBoCiz9NN1WVxmGQlvafszAjxobBuX9hf9nwqtAR3oD91Otcz3+JGYLf6B9/q7kfUQyxfTEqC1JfN46V23c1SYnuerSxvDyabSrGTeNX+n2u1GyzjhVx7OnJ/akAhJE0TfCyFkL7UVjRxk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776355994; c=relaxed/simple; bh=qIXWb9zk7cCWCWuHZHzx5UEDyqwqm3ROl3GtCRHkRO0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eB6n1btgUP4xLekLTBe4eb3fTBZaaqGIsqvOvqLj3tF2FGj/r0DSomntn7lTeETAXdRQ7dk3FOpJDpBAQplnc2Wwwmb7PtvPQi/HkpVZ0b3Q5khAqSEt8vyhnA/ZKEfLc2hEBEgeNZJAiyAbI1Y1K4OyJpzPRxu14RnUe2gwuZ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RFMlIkBM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RFMlIkBM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDC17C2BCAF; Thu, 16 Apr 2026 16:13:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776355994; bh=qIXWb9zk7cCWCWuHZHzx5UEDyqwqm3ROl3GtCRHkRO0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RFMlIkBMMOgwrHCtflz3RSb2FmJbQI3+0F0SMsRAc0uohnsekVsLJz5Z9EXVf4Xb0 CtGuojup3h+lZc0vq+tLGlF7XtmI2de9YP7mqpprDY74xiQG/jxLLMYMwLo7k3q/82 aUbDdG6fQnVsbHAwkZs8wYWu7BH+Er8zqlf1x2vL6/jy1xTnaNgbPiyQMW0pDl8Arh AIGMIJenzzQrP6mpskMgHgfAzxrYBi1dTrPg+DlXpi46lkwFLxCm675Rg8N7G4gKe/ jbdlQfMq5MkkffV4oTRE4OJwJ27mpwluJ1cW944HIiiJsDAnOQ8/IlVOBESGAkdf2Y /KE0/l9U0ErFQ== Date: Thu, 16 Apr 2026 19:13:06 +0300 From: Mike Rapoport To: =?utf-8?B?TWljaGHFgiBDxYJhcGnFhHNraQ==?= Cc: Evangelos Petrongonas , Pasha Tatashin , Pratyush Yadav , Alexander Graf , Samiullah Khawaja , kexec@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan Subject: Re: [PATCH v8 1/2] kho: fix deferred initialization of scratch areas Message-ID: References: <20260416110654.247398-1-mclapinski@google.com> <20260416110654.247398-2-mclapinski@google.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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Apr 16, 2026 at 05:06:10PM +0200, Michał Cłapiński wrote: > On Thu, Apr 16, 2026 at 4:45 PM Mike Rapoport wrote: > > > > Hi Michal, > > > > On Thu, Apr 16, 2026 at 01:06:53PM +0200, Michal Clapinski wrote: > > > @@ -2262,6 +2253,12 @@ static void __init memmap_init_reserved_range(phys_addr_t start, > > > * access it yet. > > > */ > > > __SetPageReserved(page); > > > + > > > +#ifdef CONFIG_MEMBLOCK_KHO_SCRATCH > > > > No need for #ifdef here, there's a stub returning false for > > CONFIG_MEMBLOCK_KHO_SCRATCH=n case. > > In all 3 places the #ifdef is there because MIGRATE_CMA might be > undefined. I already broke mm-new branch in the past because of that. Hmm, that hurts :/ The best I can think of is to add a static inline in memblock.h and ifdefs around it. > > > + if (memblock_is_kho_scratch_memory(PFN_PHYS(pfn)) && > > > + pageblock_aligned(pfn)) > > > + init_pageblock_migratetype(page, MIGRATE_CMA, false); > > > +#endif > > > } > > > } -- Sincerely yours, Mike.