Page MenuHomeFreeBSD

Make UVA LA57 opt-int
Needs ReviewPublic

Authored by kib on Sat, Apr 19, 10:59 AM.
Tags
None
Referenced Files
F115286886: D49913.diff
Tue, Apr 22, 6:35 AM
Unknown Object (File)
Sun, Apr 20, 6:28 PM
Unknown Object (File)
Sun, Apr 20, 12:12 PM
Unknown Object (File)
Sun, Apr 20, 11:58 AM
Unknown Object (File)
Sun, Apr 20, 10:03 AM
Unknown Object (File)
Sun, Apr 20, 2:29 AM
Unknown Object (File)
Sat, Apr 19, 11:26 PM
Unknown Object (File)
Sat, Apr 19, 6:05 PM
Subscribers

Details

Reviewers
markj

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib requested review of this revision.Sat, Apr 19, 10:59 AM
sys/amd64/amd64/pmap.c
434

Maybe default_la48_uva or something like that? The tunable affects only userspace mappings AFAIK.

437
usr.bin/elfctl/elfctl.c
71

Probably the elfctl man page should document the interaction between la48 and la57?

kib marked 3 inline comments as done.

Rename the sysctl, remove _NOFETCH flag, update the sysctl description.
Add some note about la57 + la48 flags in elfctl(1).

More words in elfctl(1).

This seems ok. I still think the approach is inferior to using the mmap() hint or a new flag. A process, especially a language runtime, could legitimately load some library which wants to use the full LA57 address space even when other components in the process do not support LA57. General-purpose applications do not get much benefit from the extra address bits, and with this approach, the extra bits are inaccessible to libraries unless the binary is specially marked. It is probably fine for appliance vendors at least.

sys/amd64/amd64/pmap.c
434

I would add some comment here that the default value is needed in order to preserve compatibility with some userspace programs.

usr.bin/elfctl/elfctl.1
99
106
107
111
usr.bin/elfctl/elfctl.c
70
72
kib marked 7 inline comments as done.Tue, Apr 22, 12:40 AM

This seems ok. I still think the approach is inferior to using the mmap() hint or a new flag. A process, especially a language runtime, could legitimately load some library which wants to use the full LA57 address space even when other components in the process do not support LA57. General-purpose applications do not get much benefit from the extra address bits, and with this approach, the extra bits are inaccessible to libraries unless the binary is specially marked. It is probably fine for appliance vendors at least.

I personally think that such library (which is fine with LA57) but the main process is not is too unlikely to exist. It needs to be too hermetic in the aspect of never leaking the memory addresses outside the internals of the library. The overall practice is to assume that there is only one allocator in the process, and whatever memory you have, it can be free()-ed. This is engraved even into C++ and Rust. Of course GC-ed runtime are not such, but C libraries loaded into them with FFI are.

Editing for comments and user strings.