Re: [PATCH RFC 01/10] vmalloc: Add basic perm alloc implementation

From: Christoph Hellwig
Date: Tue Nov 24 2020 - 05:17:20 EST


On Mon, Nov 23, 2020 at 12:01:35AM +0000, Edgecombe, Rick P wrote:
> Another option could be putting the new metadata in vm_struct and just
> return that, like get_vm_area(). Then we don't need to invent a new
> struct. But then normal vmalloc()'s would have a bit of wasted memory
> since they don't need this metadata.

That would seem most natural to me. We'll need to figure out how we
can do that without bloating vm_struct too much. One option would
be a bigger structure that embedds vm_struct and can be retreived using
container_of().