Page MenuHomeFreeBSD

LinuxKPI: alloc_pages(): Don't reclaim on __GFP_NORETRY
ClosedPublic

Authored by olce on Fri, Jul 11, 6:52 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jul 17, 9:16 PM
Unknown Object (File)
Tue, Jul 15, 7:58 PM
Unknown Object (File)
Sun, Jul 13, 7:54 AM
Unknown Object (File)
Sat, Jul 12, 6:44 AM
Unknown Object (File)
Sat, Jul 12, 12:42 AM
Unknown Object (File)
Fri, Jul 11, 8:22 AM

Details

Summary

Pass VM_ALLOC_NORECLAIM to vm_page_alloc_noobj_contig() so that it
avoids reclaiming (currently, calling vm_reserv_reclaim_contig()).

According to Linux's documentation, GFP_NORETRY should not cause any
"disruptive reclaim". alloc_pages() is called a lot from the amdgpu DRM
driver via ttm_pool_alloc(), which tries to allocate pages of the
highest order first and fallback to lower order pages (as allocating
contiguous physical pages is in fact not a requirement). This process
relies on failing fast, as requested by
GFP_NORETRY. See also related
commit 718d1928f874 ("LinuxKPI: make linux_alloc_pages() honor
__GFP_NORETRY").

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 65338
Build 62221: arc lint + arc unit

Event Timeline

olce requested review of this revision.Fri, Jul 11, 6:52 AM

Done as part of working on a recurring occurence of PR 277476.

Fro my extremely limited understanding of our VM incarnation that seems fine.

This revision is now accepted and ready to land.Fri, Jul 11, 1:53 PM