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 9AB65372662 for ; Mon, 11 May 2026 11:50:13 +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=1778500213; cv=none; b=korNeuORLqpgrt6qdplcIYWpXqIjtsVDHLORdTEIyeF0qUHFg5dngbdRsH+ivlXyzantbVQIFsVvcyjcDj6e9Z3ZV02JVA28yf1wrRyZ/iExGdXhP2GonMQxlFco98MM69BDGhw/n9VvP7P04TwhVNp7dTxIUG6y/eLtTgdsSkw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778500213; c=relaxed/simple; bh=iB75dfhb4fu+7jIbarv8WN6kU3hlr/3nqfnDZ8XmCUM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ITtqQtf2bCX5/G3HY240Q+XaNKnKI3pjl8m/sI+hnQs3TlWNB3njWW9ipO05ixPdtbiLSXkvtCQAOUai+/KeM3qO9/Km4+XTdrfEv7SUcdYvFO/SmbFmzI5jLswL+yb+NrhnrqjGyRTJgEZGp+Ht2IRtF8OghoKnJhP23b+ERxU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VKrYqt5j; 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="VKrYqt5j" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F409EC2BCB0; Mon, 11 May 2026 11:50:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778500213; bh=iB75dfhb4fu+7jIbarv8WN6kU3hlr/3nqfnDZ8XmCUM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VKrYqt5j1WNBcVraimWDifAMr/mJg+yvi6st6hSJMhpFMGulbasH1JAIHPmg22mLf SfM4wHr9M6VThKarworHqrmfr2eQMvp4dB/1YVDhv8u7ruhqUpNAyVwj5hzRqQax5f oABxKuiaJh5WjUm1V9yO5jWVBnDS9toYqIxQ5VivKVNipRlk1r4lPnteR7dtr6Eoe5 DLtaTOmVa6hVjcf66yKc+Kx7InRklF2sRSXKUHTabpwe24oY1X7pju19pdJPfBaF0H P8h7UzZ3q3/S7uovgEFffVewlsQCQP5hSTZrxDRAououlkCxcGEcP5y/1CGbq9H0QX HOODyoL/cQFaQ== Date: Mon, 11 May 2026 14:50:06 +0300 From: Mike Rapoport To: Pratyush Yadav Cc: Pasha Tatashin , Alexander Graf , Muchun Song , Oscar Salvador , David Hildenbrand , Andrew Morton , Jason Miu , kexec@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 04/12] kho: add callback for table pages Message-ID: References: <20260429133928.850721-1-pratyush@kernel.org> <20260429133928.850721-5-pratyush@kernel.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: <20260429133928.850721-5-pratyush@kernel.org> On Wed, Apr 29, 2026 at 03:39:06PM +0200, Pratyush Yadav wrote: > From: "Pratyush Yadav (Google)" > > The KHO memory preservation radix tree does not mark the table pages > themselves as scratch. This is done to avoid a circular dependency where > preserving a page can lead of allocating other preserved pages. This > means any walker looking for free ranges of memory outside of scratch > areas will ignore the table > > Add a table callback that is invoked for each table page. The callback A sentence why a table callback helps would be nice here :) > is given the physical address of the table page. > > Signed-off-by: Pratyush Yadav (Google) > --- > include/linux/kho_radix_tree.h | 3 +++ > kernel/liveupdate/kexec_handover.c | 12 ++++++++++++ > 2 files changed, 15 insertions(+) > > diff --git a/include/linux/kho_radix_tree.h b/include/linux/kho_radix_tree.h > index 030da6399d28..fe7151d89361 100644 > --- a/include/linux/kho_radix_tree.h > +++ b/include/linux/kho_radix_tree.h > @@ -37,12 +37,15 @@ struct kho_radix_tree { > /** > * struct kho_radix_walk_cb - Callbacks for KHO radix tree walk. > * @key: Called on each present key in the radix tree. > + * @table: Called on each table of the radix tree itself. Receives the > + * physical address of the page containing the table. > * > * For each callback, a return value of 0 continues the walk and a non-zero > * return value is directly returned to the caller. > */ > struct kho_radix_walk_cb { > int (*key)(unsigned long key); > + int (*table)(phys_addr_t phys); Naming is hard ;-) > }; > -- Sincerely yours, Mike.