Re: [PATCH] fuse: replace passthrough backing-id IDR with IDA plus hashtable

From: Miklos Szeredi

Date: Mon Jun 22 2026 - 03:26:21 EST


On Sun, 21 Jun 2026 at 20:32, Mahad Ibrahim <mahad.ibrahim.dev@xxxxxxxxx> wrote:

> Replace the IDR with an IDA for id allocation and a separate hashtable for
> the id-to-pointer lookup. The IDA needs far less memory per id; the
> hashtable adds a fixed per-connection cost. The net effect is a space win
> that grows with the number of live backings, as quantified below.

But why use IDA at all? A simple cyclic counter should be sufficient.
Collisions (which should be rare) can be avoided via hash table
lookup.

Thanks,
Miklos