Skip to content

Draft: Panfrost poison mmap

Erik Faye-Lund requested to merge kusma/mesa:panfrost-poison-mmap into main

Here's an MR to try and reduce crashes when running out of memory.

In order to test this, I've added an mmap "poisoning" knob, which causes a given rate of failures when mmapping. The reason I targeted mmap is that we were completely missing error-checking in that code-path. These will get turned into allocation errors in most cases.

This doesn't fix all possible crashes. But with this series I can run glxgears "successfully" with a poison-rate of around 1 in every 7 allocations; there's some allocation at start-up that I haven't tackled. Those allocation errors would probably turn into failures to run instead anyway, and are really unlikely to be hit.

But the bigger thing here is that this MR changes some guarantees in the driver, and I wonder how people feel about these. Some of them feel a bit heavy-handed, but I can't see any obvious alternatives. Input greatly appreciated here.

I've also only run this on V10. We probably also want to do the same exercise for V7 etc as well.

/cc @alyssa @bbrezillon @lfrb @ericsmith

Merge request reports

Loading