Page MenuHomeFreeBSD

shm: Document shm_create_largepage()
ClosedPublic

Authored by markj on Jan 30 2023, 5:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 21 2024, 9:20 PM
Unknown Object (File)
Sep 20 2024, 2:48 AM
Unknown Object (File)
Sep 19 2024, 7:45 PM
Unknown Object (File)
Sep 19 2024, 4:55 PM
Unknown Object (File)
Sep 17 2024, 4:18 AM
Unknown Object (File)
Sep 4 2024, 3:57 PM
Unknown Object (File)
Sep 1 2024, 3:50 PM
Unknown Object (File)
Sep 1 2024, 11:22 AM

Details

Summary

While here, move notes about FreeBSD-specific functionality to the
COMPATIBILITY section, and document the ECAPMODE error for shm_open().

Diff Detail

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

Event Timeline

markj requested review of this revision.Jan 30 2023, 5:29 PM
  • Add an MLINK.
  • Fix some lint warnings.
lib/libc/sys/shm_open.2
193

Perhaps mention munmap(2) as well.

212
213

Might be mention ftruncate(2) again?

217

If the wait-less allocation. I understand that there is no such word. Might be, say 'if system has suitable physical memory immediately available'?

234

or a non-blocked signal is delivered to the thread

262

Might be, mention that the initial shm obj parameters are set by FIOSSHMLPGCNF during shm_create_largepage(). This is useful to know to read truss/ktrace output.

markj marked 6 inline comments as done.
  • Take kib's suggestions.
lib/libc/sys/shm_open.2
217

I wrote "non-blocking".

This revision is now accepted and ready to land.Jan 30 2023, 9:15 PM
pauamma_gundo.com added inline comments.
lib/libc/sys/shm_open.2
181

Or maybe "of mappings"

184

For consistency with

This ensures that the object can be mapped using so-called
.Dq superpages ,

190–191

Same as above

220
240–241

Is the kernel able to detect that and give up? Or would the thread just lock up in the kernel? (In the latter case, maybe suggest a reasonable value for calling alarm() or some other way to recover.)

269–270
This revision now requires changes to proceed.Jan 31 2023, 4:23 PM
markj marked 3 inline comments as done.Feb 1 2023, 5:28 PM
markj added inline comments.
lib/libc/sys/shm_open.2
184

Here I'm referring to a physical page size, whereas a "superpage" usually refers to the size of a virtual mapping. I think the suggested change is a bit confusing and not really consistent with the rest of the text.

240–241

The previous sentence mentions that a signal can interrupt the allocation, which seems like enough of a hint to me? I don't really want to be prescriptive here, if only to discourage the use of this policy.

  • Address some review feedback.
This revision is now accepted and ready to land.Feb 1 2023, 5:51 PM
This revision was automatically updated to reflect the committed changes.