[LITMUS^RT] RFP: Jumbo Ring Buffers

Björn Brandenburg bbb at mpi-sws.org
Tue Apr 23 07:30:16 CEST 2013


On 22.04.2013, at 23:33, Glenn Elliott <gelliott at cs.unc.edu> wrote:

> My test platform has over 64GB of memory.  I would be happy to give 32GB over to tracing if it were necessary for my experiments.
> 
> Is there a way to use dynamically allocated page-locked buffers instead of static ones?  Are we limited by the kernel address space mechanisms?  If so, can we hijack user high page allocation for our needs?  I suppose we could lose boot-time tracing capabilities, but I think we could probably live with this.  Comments?  Ideas?

It's certainly possible. It's mostly a question of figuring out the right way to allocate the buffers (which API to use). 

As far as I know, kernel memory allocated by the normal "get free pages" API allocates physically contiguous frames. That's the bottleneck—even on huge RAM machines, large physically contiguous chunks are very hard to find, especially in the memory region used by the kernel by default. 

What we need to do instead is to allocate physically non-contiguous memory and install page table entries to make it virtually contiguous, just like userspace memory.

I don't think we need to "hack" anything; a proper allocator most likely exists already. We just need to figure out which it is and patch the code to use it. I'm happy to merge patches that do this. :-)

Thanks,
Björn



More information about the litmus-dev mailing list