Page MenuHomeFreeBSD

vnode_pager_setsize.9: Some clarifications on the manpage
ClosedPublic

Authored by khng on Apr 8 2021, 7:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 7, 11:34 PM
Unknown Object (File)
Feb 12 2024, 11:52 PM
Unknown Object (File)
Jan 29 2024, 9:23 PM
Unknown Object (File)
Jan 29 2024, 9:23 PM
Unknown Object (File)
Jan 29 2024, 9:23 PM
Unknown Object (File)
Jan 29 2024, 9:23 PM
Unknown Object (File)
Jan 29 2024, 9:23 PM
Unknown Object (File)
Dec 12 2023, 11:29 AM
Subscribers

Details

Summary

A number of changes:

  • Clarifies the locking rules when calling the routine.
  • Correct the description regarding the content range to be purged.
  • Document the effects on page fault handler.

MFC after: 3 days
MFC with: 86a52e262a6f
Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 38397
Build 35286: arc lint + arc unit

Event Timeline

khng requested review of this revision.Apr 8 2021, 7:38 AM
bcr added a subscriber: bcr.

OK from manpages. For this content change, you need to bump the .Dd to the date of the commit.
Thanks!

This revision is now accepted and ready to land.Apr 8 2021, 7:41 AM

.Dd updates and add document the direction from old EOF to new EOF as well.

This revision now requires review to proceed.Apr 8 2021, 7:44 AM

Ah, even better now. Good to go!

This revision is now accepted and ready to land.Apr 8 2021, 7:56 AM
share/man/man9/vnode_pager_setsize.9
45–52

'Content purged from cache' is a vague slang, we usually formulate it in terms of 'pages removes from the object queue', and then you can clarify what happens with pages fully contained in the range, and what with the partial page.

52

I do not understand this paragraph at all.

60

Arguably, this sentence is not an implementation note, but a good herald description of the function.

64

will be zeroed if it exists resident.

This revision now requires review to proceed.Apr 8 2021, 7:23 PM

OK for this newer version of the manpage.

Also, your updates still miss the _main_ point of the function, that is, to define which part of oversized file mapping causes SIGBUS.

share/man/man9/vnode_pager_setsize.9
45–52

There are at least two object sizes for OBJT_VNODE, one is the size in pages, and another in bytes. I am not sure it makes much sense to try to articulate that assigning byte size to page size requires some arithmetic.

51

This sentence is technically correct but sounds foreign even for me non-native.

53

What are you trying to say there? Page chunks at EOF are marked invalid, invalid cannot be dirty.

57

vm object allocated

Updated. Document the behavior around page faults as well.

Wording around page fault behavior.

khng marked 3 inline comments as done.Apr 8 2021, 9:53 PM
share/man/man9/vnode_pager_setsize.9
46

... zeroed and marked invalid...

53

s/useful for use/must be used/

... to implement truncation if filesystem allocated vm_object.

This revision is now accepted and ready to land.Apr 8 2021, 10:32 PM

Approved by: philip (mentor)

This revision was automatically updated to reflect the committed changes.
khng marked an inline comment as done and an inline comment as not done.