aboutsummaryrefslogtreecommitdiff
path: root/lib/libiconv_modules/mapper_646
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2016-12-08 11:26:11 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2016-12-08 11:26:11 +0000
commitc42b43a0545eb23e7d771ecc004dd18e31367433 (patch)
treed127721d72e9a9fc663c2a1a0c3cc2acdbb5fae5 /lib/libiconv_modules/mapper_646
parentdc5401d24086046f10ac68b0648e2c136333730f (diff)
downloadsrc-c42b43a0545eb23e7d771ecc004dd18e31367433.tar.gz
src-c42b43a0545eb23e7d771ecc004dd18e31367433.zip
Add a new populate() pager method and extend device pager ops vector
with cdev_pg_populate() to provide device drivers access to it. It gives drivers fine control of the pages ownership and allows drivers to implement arbitrary prefault policies. The populate method is called on a page fault and is supposed to populate the vm object with the page at the fault location and some amount of pages around it, at pager's discretion. VM provides the pager with the hints about current range of the object mapping, to avoid instantiation of immediately unused pages, if pager decides so. Also, VM passes the fault type and map entry protection to the pager, allowing it to force the optimal required ownership of the mapped pages. Installed pages must contiguously fill the returned region, be fully valid and exclusively busied. Of course, the pages must be compatible with the object' type. After populate() successfully returned, VM fault handler installs as many instantiated pages into the process page tables as it sees reasonable, while still obeying the correct semantic for COW and vm map locking. The method is opt-in, pager sets OBJ_POPULATE flag to indicate that the method can be called. If pager' vm objects can be shadowed, pager must implement the traditional getpages() method in addition to the populate(). Populate() might fall back to the getpages() on per-call basis as well, by returning VM_PAGER_BAD error code. For now for device pagers, the populate() method is only allowed to be used by the managed device pagers, but the limitation is only made because there is no unmanaged fault handlers which could use it right now. KPI designed together with, and reviewed by: alc Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 3 weeks
Notes
Notes: svn path=/head/; revision=309710
Diffstat (limited to 'lib/libiconv_modules/mapper_646')
0 files changed, 0 insertions, 0 deletions