Re: [PATCH] 9p: Use kvmalloc for message buffers

From: Christian Schoenebeck
Date: Fri Aug 08 2025 - 07:12:29 EST


On Wednesday, August 6, 2025 11:44:34 PM CEST Dominique Martinet wrote:
>
> Pierre Barre wrote on Wed, Aug 06, 2025 at 05:50:42PM +0200:
> > If I submit a patch based on what has been discussed above, is it
> > likely to be accepted? Unfortunately, in my current setup, I am
> > encountering this issue quite frequently, and users of my servers are
> > having a hard time making sense of the error.
>
> Yes, sorry it wasn't clear.
>
> I still have no idea what's the "best" allocation method that we'll be
> able to use as either a vmalloc buffer or split into a scatterlist, but
> there's little point in worrying too much about it, so please go ahead.
>
> If it's restricted to trans_fd and there's a chance we can make use of
> it with (at least) virtio later I think everyone will be happy :)

Yes, sounds like a viable plan.

Pierre, one more thing to note: kmem_cache_alloc() might still fail though. So
maybe it would make sense to add a separate patch that would check the result
of kmem_cache_alloc() and if it fails, falling back to your kvmalloc() call
(if enabled by the discussed transport mechanism of course).

/Christian