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 C12C8221277 for ; Fri, 22 May 2026 13:24:13 +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=1779456255; cv=none; b=ZkcPnfEIxGYHHNOuWR1cXD0nCuTtaOm0TORWbdSVy5wa3CCpPu6sbP+rdsMNyis2f0CplIldz4HqsVzExNpxA8WzcXDgWM/qsfms8Z3+wKWqme+sjmA2ZzugtgtQRHo7ppZIEz+HMZCeCj0n2KzRMBIkxxQ5MOTVofgssq4H5Z0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779456255; c=relaxed/simple; bh=tMzTe8oo1u5Rz66VpOhL2lQc3t4zTn9iWOiTIsf5G+Q=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=rjpqAGKVA6i7SxO57IlKf3wWos/9FQc0hmso1h6M+wvM+y8d0CPIMDfrb63FYWHOUrlwHyVTmm/UVbf9RUn1b7Wx/Co/dSQaav18aOdUStGM9iyCI0ZlWzQFbU3fGz/jlQH/6ThWYeBGEjyoS2+Bs+yQypTBxlGos//FQiA45zY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GHtcqGUb; 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="GHtcqGUb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 204D61F00A3D; Fri, 22 May 2026 13:24:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779456253; bh=46NyHzj3stcXZnP51xXm8AEPZCDBIfj/VG/WitvWNgs=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=GHtcqGUbEssMPpnShLAlpNSehIRjZL9H0xancMaKqYitLz0mUR6TLACisQckAnGtB FsaYcp6cb3SPgHgF9oGJLJLhheIiPuqjv+214shLErZoK35uTMDqXuBOKZUAnDndC3 L/LnbSFR/fESiuCrG8h8oRadwJULpu3N5LQigmPbSTKg/HFUIMW5p0mb5ZhgT63MTy nJU7UlxQuAyfgg5EdCnez/t9viHx5xY5ulScuwBG/4Z+cktsTwxbk5YgnoT3ucUJdt xGhmAc4xsPhmrqu5lC6IZwwY6YyJ+Q+duWMsbNOChBmIDMMMbV/xvscPya0kIoyyuL Wa7fPDhHCFUdQ== From: Pratyush Yadav To: Pasha Tatashin Cc: Pratyush Yadav , Mike Rapoport , 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 07/12] kho: allow destroying KHO radix tree In-Reply-To: (Pasha Tatashin's message of "Thu, 21 May 2026 23:46:23 +0000") References: <20260429133928.850721-1-pratyush@kernel.org> <20260429133928.850721-8-pratyush@kernel.org> Date: Fri, 22 May 2026 15:24:09 +0200 Message-ID: <2vxzwlwv7f2e.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Thu, May 21 2026, Pasha Tatashin wrote: > On 04-29 15:39, Pratyush Yadav wrote: >> From: "Pratyush Yadav (Google)" >> >> Add kho_radix_destroy_tree() which allows destroying the radix tree and >> freeing all its pages. >> >> Signed-off-by: Pratyush Yadav (Google) >> --- >> include/linux/kho_radix_tree.h | 3 +++ >> kernel/liveupdate/kexec_handover.c | 34 ++++++++++++++++++++++++++++++ >> 2 files changed, 37 insertions(+) > > Generally, in Linux, recursion is avoided due to statically sized kernel > stacks. However, here we are bound by a relatively shallow KHO tree, and > kho_radix_walk_tree() is already recursive, so I think it is alright. We > just need to be mindful of local variable usage (frame sizes) within these > recursive functions. Yep, recursion is strictly bounded and the depth is no worse than any page table walkers for example. > > Reviewed-by: Pasha Tatashin Thanks! -- Regards, Pratyush Yadav