Thread (5 messages) flat view 5 messages, 3 authors, 2017-02-28

CMA question

From: Greg KH <hidden>
Date: 2017-02-26 16:31:52

On Sun, Feb 26, 2017 at 05:29:05PM +0100, Johannes Thoma wrote:
Dear Kernel hackers,

As far as I understood CMA (contiguous memory allocation) memory is used 
for other purposes as long it isn't requested via cma_alloc() by a 
driver. cma_alloc then tries to free the memory by relocating it and 
returns the contiguous area.

I have a case where cma_alloc() sometimes fails to relocate the memory 
which causes my driver (a GPU driver) to fail starting up (the driver is 
started when the system is running for a while). Is there a way to 
prevent the CM allocator to use the memory for any other purpose? Or 
should I better use another mechanism to allocate  contiguous memory at 
boot time (is there a framework for doing so)?
If at boot time you don't have enough memory, something is really wrong
and your driver shouldn't work, that's to be expected.  Try starting it
earlier in the boot process.

Do you have a pointer to your driver anywhere so we could see if you are
doing something odd with the cma interface?

thanks,

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help