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, Jun 21, 11:52 PM
Unknown Object (File)
Mon, Jun 17, 10:21 PM
Unknown Object (File)
May 18 2024, 3:06 PM
Unknown Object (File)
Feb 16 2024, 5:14 AM
Unknown Object (File)
Feb 16 2024, 4:21 AM
Unknown Object (File)
Jan 29 2024, 5:16 AM
Unknown Object (File)
Dec 27 2023, 9:07 PM
Unknown Object (File)
Dec 20 2023, 1:23 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.