Page MenuHomeFreeBSD

Implement pmap_mincore() for riscv.
ClosedPublic

Authored by markj on Jul 25 2018, 6:46 PM.
Tags
None
Referenced Files
F175785966: D16444.id45845.diff
Tue, Oct 13, 8:44 AM
F175774607: D16444.id.diff
Tue, Oct 13, 6:17 AM
F175748600: D16444.id45880.diff
Tue, Oct 13, 12:33 AM
Unknown Object (File)
Mon, Oct 12, 5:58 PM
Unknown Object (File)
Tue, Sep 22, 1:17 PM
Unknown Object (File)
Sun, Sep 20, 8:42 PM
Unknown Object (File)
Sep 11 2026, 12:01 PM
Unknown Object (File)
Sep 7 2026, 3:49 PM
Subscribers

Details

Test Plan

Tests in lib/libc/sys/mincore_test pass.

Diff Detail

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

Event Timeline

markj added reviewers: alc, br.
alc added inline comments.
sys/riscv/riscv/pmap.c
3200 ↗(On Diff #45845)

Why |= here and ...

3207 ↗(On Diff #45845)

simply = here?

This revision is now accepted and ready to land.Jul 26 2018, 3:32 PM
sys/riscv/riscv/pmap.c
3200 ↗(On Diff #45845)

No reason. I'll change it to = before committing.

sys/riscv/riscv/pmap.c
3198 ↗(On Diff #45845)

As an aside, the RISC-V designers have made an interesting architectural choice here. Hypothetically, we could speed up fork() on x86 by removing write permission at the upper levels of the page table, and sharing the lower-level page table pages until pmap_enter() tries to create a writeable mapping at a lower level. Only then would you allocate a new page table page, copying the old one, and removing write access from the other PTEs in that copied page table page. However, this way of expressing superpage mappings eliminates the possibility of such an optimization.

This revision was automatically updated to reflect the committed changes.