fdo bug 23993 shows memory allocation problems when system is under
memory pressure. Possible solution would be splitting the kernel space
array to multiple arrays which are then used for processing instead of
one signle large block.
Attached patches have code to fix the preKMS path which is reported to
fail in the bug 239994. First patchs adds generic interface to manage
multipart buffers for copy operation from user space. Second patch
converts radeon_state.c and r300_cmdbuf.c to use the multipart buffer.
I have only compiled code but not yet tested if it runs correctly. But
there is memory management problem which I can't solve with knowledge
that I have.
Would it be better to use alloc_page instead of k[cm]alloc?
Another change that I'm considiring is making drm_buffer structure
variable sizes. This way the array of pointers would be stored in
drm_buffer instead of separate allocation.
I did look at flex_array but it didn't seem to provide the
functionality that is required for command stream processing. Maybe it
would be better to extent the flex_array to include the required
functionality but I didn't check if it is easily possible.
Of course fixing old code path might be waste of time but it looked
relative easy to fix compared to severity of the bug.
Get latest updates about Open Source Projects, Conferences and News.