Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,059
    • Issues 3,059
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 997
    • Merge requests 997
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MesaMesa
  • mesamesa
  • Merge requests
  • !18579

panfrost: Evict the BO cache when allocation fails

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Alyssa Rosenzweig requested to merge alyssa/mesa:panfrost/bo-evict into main Sep 13, 2022
  • Overview 1
  • Commits 1
  • Pipelines 6
  • Changes 1

If memory allocation fails, we look for a suitable sized BO in the BO cache and wait until we can use its memory. That usually works, but there's a case when it can fail despite sufficient memory in the system: BOs in the BO cache contributing to memory pressure but none of them being of sufficient size. This case is not just theoretical: it's seen in the OpenCL test_non_uniform_work_group, which puts the system under considerable memory pressure with an unusual allocation pattern.

To handle this case, try evicting everything from the BO cache and stalling in order to allocate, if the above attempts failed. Fixes the following error:

DRM_IOCTL_PANFROST_CREATE_BO failed: No space left on device

on the aforementioned OpenCL test.

Signed-off-by: Alyssa Rosenzweig alyssa@collabora.com

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: panfrost/bo-evict