Page MenuHomeFreeBSD

vnode_pager_setsize.9: Some clarifications on the manpage
ClosedPublic

Authored by khng on Thu, Apr 8, 7:38 AM.

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
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

khng requested review of this revision.Thu, Apr 8, 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.Thu, Apr 8, 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.Thu, Apr 8, 7:44 AM

Ah, even better now. Good to go!

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

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

47

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

49

I do not understand this paragraph at all.

56–57

will be zeroed if it exists resident.

This revision now requires review to proceed.Thu, Apr 8, 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
43–44

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.

48

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

50

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

54

vm object allocated

Updated. Document the behavior around page faults as well.

Wording around page fault behavior.

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

... zeroed and marked invalid...

43–44

s/useful for use/must be used/

... to implement truncation if filesystem allocated vm_object.

This revision is now accepted and ready to land.Thu, Apr 8, 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.