Page MenuHomeFreeBSD

rangeset: add next() for iteration
ClosedPublic

Authored by dougm on Jun 6 2024, 9:02 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 5, 12:15 AM
Unknown Object (File)
Wed, Nov 5, 12:15 AM
Unknown Object (File)
Tue, Nov 4, 9:55 PM
Unknown Object (File)
Tue, Nov 4, 7:08 PM
Unknown Object (File)
Tue, Nov 4, 7:08 PM
Unknown Object (File)
Tue, Nov 4, 7:08 PM
Unknown Object (File)
Tue, Nov 4, 4:29 PM
Unknown Object (File)
Mon, Nov 3, 10:00 PM
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

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.