Re: misc: fastrpc: is a ctx_idr IDR -> XArray conversion wanted?
From: Greg KH
Date: Wed Sep 23 2026 - 05:51:15 EST
On Wed, Sep 23, 2026 at 01:52:05PM +0530, Murali Krishna wrote:
> Hi Srini, Ekansh,
>
> I am new to kernel development and would like to start contributing. I
> do not have much experience yet, but I am willing to learn and to put in
> the work properly.
>
> Documentation/core-api/idr.rst states that the IDR interface is
> deprecated in favour of the XArray, and fastrpc's ctx_idr is still an
> IDR. I have a conversion prepared -- XA_FLAGS_ALLOC1, xa_alloc_cyclic()
> with the cursor kept in struct fastrpc_channel_ctx, xa_load() and
> xa_erase(), and cctx->lock left as it is -- with no intended functional
> change.
>
> Before posting it, I would rather ask than take up your review time: is
> such a conversion wanted in fastrpc, or is the IDR usage here fine as it
> is? I have seen similar conversions in other subsystems declined as
> unnecessary, so I did not want to assume.
I doubt it's really needed unless you can prove some sort of advantage
for the change? Is it faster on a measurable path, or less memory or
something else that would justify the churn?
idr is still a fine structure/api for many things, they don't all have
to go away, otherwise we would have done so long ago.
thanks,
greg k-h