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 235EE25C80E for ; Tue, 5 May 2026 12:54:31 +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=1777985672; cv=none; b=d9DgFplVjJzfmvR7ONws4NsVqwL3Hcz4YEqfsq6+PcHzstQMEBlBZrTRv5BeD883SbE/86+2yjrNs8I9vBKUFfnzBEkB5fnO+J+wDQnxpPMAuE+U/L2Jbx8lNe7Q0ObgDd2/1P1b0gxwElizskzXVxj0Zazv2s1ejSO6cxjYajg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777985672; c=relaxed/simple; bh=+N0bcqLoMfCKrRzjn409ABjF3VG3lutlDleguHU1gMY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=VFskLiBH5+bt8JRf1Uvhf28gFdjHAXgwjIyp3D/5gns8ZA4aujHVflv3xK3QCCTdz8uyW35KC9av96ERB8Dgx0PCS+YZbkHDCc6sS6uc0+sSApxl1FhKvxEXgGSqIDeUtK56bNA0NrBz0ae7eMgtOa6+IY18HAdczjKfnUJgoEk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mUWj78NJ; 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="mUWj78NJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACE9AC2BCC7; Tue, 5 May 2026 12:54:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777985671; bh=+N0bcqLoMfCKrRzjn409ABjF3VG3lutlDleguHU1gMY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=mUWj78NJ6NaeKrIkzqEk78tvh91VgHNAcuHRL6eX1AgQF+YiYT1G6CPJDqLgnWXOa k05SaoKl2K+N0jm9ahJm7/dmxzYsGZHI2CaRUAeYu6vCnFh/fMjgTxHgzXj4pz8IK5 Vsel93yCQ6y3feeyxFtZb+u+Sj8xLeU+DhxPtauTQbnB7/QiDuqLQTE1yqvKeDh18a /faSDiUbzhpm7+iCNGutW4xGxgSceU2Imy8aQ6iHpXBTesq+8lfDyuCXr3aluqfs2c oiSOzilb6j+zTK2tgzdYFkPNLMUK8B7RrBufGEPCjyhtpDyRJRCY1QFbAyE8dUVXuj bcW655W4QvVOA== From: Pratyush Yadav To: Jork Loeser Cc: Pratyush Yadav , Mike Rapoport , 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 01/12] kho: generalize radix tree APIs In-Reply-To: <331da42-b255-326b-cd5-28d07a7e2cb2@linux.microsoft.com> (Jork Loeser's message of "Tue, 5 May 2026 04:20:14 -0700 (PDT)") References: <20260429133928.850721-1-pratyush@kernel.org> <20260429133928.850721-2-pratyush@kernel.org> <331da42-b255-326b-cd5-28d07a7e2cb2@linux.microsoft.com> Date: Tue, 05 May 2026 14:54:28 +0200 Message-ID: <2vxztssm10fv.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 Tue, May 05 2026, Jork Loeser wrote: > On Wed, 29 Apr 2026, Pratyush Yadav wrote: > >> From: "Pratyush Yadav (Google)" >> >> The KHO radix tree is a data structure that can track the presence or >> absence of an arbitrary key, with nothing inherently tied to KHO memory >> preservation tracking. This was one of the design goals of the radix >> tree. This was done to enable it to be re-used by other users of KHO. > > "Arbitrary key": Not quite the complete 64-bits, rather 64 - PAGE_SIZE, correct? Right, 64 - PAGE_SHIFT. > >> + * kho_radix_add_key - Add a key to the radix tree. >> * @tree: The KHO radix tree. >> + * @key: The key to add. >> * >> + * This function traverses the radix tree based on the key provided. It sets the >> + * corresponding bit in the leaf bitmap to mark the key as present. If >> + * intermediate nodes do not exist along the path, they are allocated and added >> + * to the tree. > > Consider adding a note on the key-width limitation. I think adding a runtime check would also be a good idea here. -- Regards, Pratyush Yadav