Page MenuHomeFreeBSD

Release the correct number of held pages.
ClosedPublic

Authored by jhb on Oct 21 2015, 6:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 15, 6:16 AM
Unknown Object (File)
Wed, Oct 30, 10:02 PM
Unknown Object (File)
Sat, Oct 26, 5:30 PM
Unknown Object (File)
Sep 24 2024, 5:31 PM
Unknown Object (File)
Sep 11 2024, 9:54 PM
Unknown Object (File)
Sep 8 2024, 11:58 AM
Unknown Object (File)
Sep 8 2024, 5:51 AM
Unknown Object (File)
Sep 8 2024, 5:14 AM
Subscribers

Details

Summary

i915_gem_do_execbuffer() holds the pages backing each relocation region for
various reasons while executing user commands. After these commands are
completed, the pages backing the relocation regions are unheld.

Since relocation regions do not have to be page aligned, the code in
validate_exec_list() allocates 2 extra page pointers in the array of
held pages populated by vm_fault_quick_hold_pages(). However, the cleanup
code that unheld the pages always assumed that only the buffer size /
PAGE_SIZE pages were used. This meant that non-page aligned buffers would
not unheld the last 1 or 2 pages in the list. Fix this by saving the
number of held pages returned by vm_fault_quick_hold_pages() for each
relocation region and using this count during cleanup.

Test Plan
  • boot a test kernel with an extra debugging printf from the previous patch to verify the issue was hit.
  • run X under the test kernel for the past half day

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb retitled this revision from to Release the correct number of held pages..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added reviewers: dumbbell, kib.
kib edited edge metadata.
This revision is now accepted and ready to land.Oct 21 2015, 6:50 PM
This revision was automatically updated to reflect the committed changes.