Page MenuHomeFreeBSD

man9: Add a manual page for pmap_active_cpus(9)
Needs ReviewPublic

Authored by raghav.original_gmail.com on Sun, Mar 29, 8:57 AM.
Referenced Files
F153138670: D56143.diff
Sun, Apr 19, 10:30 AM
Unknown Object (File)
Sat, Apr 18, 10:02 AM
Unknown Object (File)
Wed, Apr 15, 12:40 PM
Unknown Object (File)
Wed, Apr 15, 4:33 AM
Unknown Object (File)
Sun, Apr 12, 9:21 PM
Unknown Object (File)
Sun, Apr 12, 5:23 AM
Unknown Object (File)
Sat, Apr 11, 8:05 PM
Unknown Object (File)
Fri, Apr 10, 4:02 PM
Subscribers

Details

Reviewers
kib
Summary

man9: Add a manual page for pmap_active_cpus(9)

Area: man9, VM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

The result of the call is invalid the moment the function returns. If this one-line manual page ever makes sense, it must describe how to use the result safely.

Also it probably worth explaining what 'active' means.

In D56143#1284104, @kib wrote:

Also it probably worth explaining what 'active' means.

Thank you @kib for reviewing

I'll make these changes.

Hi @kib,
I read your comments from kern_membarrier.c
Please can you correct me if I'm wrong "The function returns a mask of the CPUs where the given pmap is active(Here a CPU is active for a pmap if its using address space represented by that pmap). CPUs that switch context during the call might be missed, so the caller must ensure synchronization or otherwise the result could be invalid immediately after the call." I'll add this in a separate NOTE section

This should be not a note, but a proper explanation. Besides talking about that, it might be useful to explain how to get the stable results.

For the definition of active, also a remark that TLB on the active core is loaded with translations from the AS, perhaps would be useful.