Page MenuHomeFreeBSD

rangeset: add next() for iteration
ClosedPublic

Authored by dougm on Jun 6 2024, 9:02 AM.
Tags
None
Referenced Files
F150879881: D45511.id.diff
Sat, Apr 4, 4:32 PM
F150819053: D45511.id139553.diff
Sat, Apr 4, 6:41 AM
F150811848: D45511.id139550.diff
Sat, Apr 4, 5:28 AM
Unknown Object (File)
Fri, Apr 3, 3:07 PM
Unknown Object (File)
Fri, Apr 3, 10:31 AM
Unknown Object (File)
Thu, Apr 2, 7:12 PM
Unknown Object (File)
Thu, Apr 2, 4:59 PM
Unknown Object (File)
Mon, Mar 23, 9:44 AM
Subscribers

Details

Summary

Add a method rangeset_next to find the first range that starts at or after a given value. Use it to rewrite pmap_pkru_same to avoid walking a page at a time over pages in no range.

Test Plan

A kernel builds and boots.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dougm requested review of this revision.Jun 6 2024, 9:02 AM
dougm created this revision.

Make similar changes for arm64.

sys/arm64/arm64/pmap.c
9296

Shouldn't we use va here?

dougm marked an inline comment as done.

Fix lazy editting observed by @andrew

sys/arm64/arm64/pmap.c
9296

Yep.

Typos abound. Squashed another.

This revision is now accepted and ready to land.Jun 6 2024, 2:32 PM
This revision was automatically updated to reflect the committed changes.

@kib Do you have any PKU test programs that could be run to check this?

In D45511#1038472, @alc wrote:

@kib Do you have any PKU test programs that could be run to check this?

Specifically to check this patch, probably not. Existing PKRU tests were imported as tools/test/stress2/misc/pkru.sh and pkru2.sh.