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
F55660523: D29637.diff
Tue, Jan 31, 10:55 PM
Unknown Object (File)
Dec 14 2022, 8:03 AM
Unknown Object (File)
Nov 26 2022, 7:35 PM
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 38437
Build 35326: 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
56–63

'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.

63

I do not understand this paragraph at all.

66–67

will be zeroed if it exists resident.

70

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

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
56–63

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.

62

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

64

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

68

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
57

... zeroed and marked invalid...

64

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.