Page MenuHomeFreeBSD

vnode_pager_setsize.9: Some clarifications on the manpage

Authored by khng on Apr 8 2021, 7:38 AM.
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



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

rG FreeBSD src repository
Lint Not Applicable
Tests Not Applicable

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.

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

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


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


I do not understand this paragraph at all.


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.


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.


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


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


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

s/useful for use/must be used/

... to implement truncation if filesystem allocated vm_object.


... zeroed and marked invalid...

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.