Page MenuHomeFreeBSD

Use atomics for paging in progress.
ClosedPublic

Authored by jeff on Aug 18 2019, 8:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 22 2023, 10:02 PM
Unknown Object (File)
Nov 15 2023, 3:02 PM
Unknown Object (File)
Nov 11 2023, 5:22 AM
Unknown Object (File)
Nov 6 2023, 4:38 PM
Unknown Object (File)
Oct 14 2023, 2:07 PM
Unknown Object (File)
Oct 9 2023, 6:12 AM
Unknown Object (File)
Oct 5 2023, 3:36 PM
Unknown Object (File)
Aug 2 2023, 12:36 AM
Subscribers

Details

Summary

This ultimately will allow us to drop the object lock in more cases. This diff just sets things up so this is possible.

pip_wait is simply a barrier. If the caller doesn't somehow enforce that no new I/O can be started before calling pip_wait() it can become non-zero immediately after returning. The call does still guarantee that pip reached zero at some point.

We use pip when collapsing objects and in this case the object lock will guarantee that no new faults or pageouts can occur. The other use is in vfs which simply wants to know that a fsync completed. Here the vnode lock is held and ensures that no new I/O can start.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 25943
Build 24504: arc lint + arc unit

Event Timeline

jeff added reviewers: kib, alc, markj.
sys/vm/vm_object.c
785

Why did you move this block?

sys/vm/vm_object.c
785

It may not be 100% required but it was non-nonsensical. Since the buffer cache is going to increment paging in progress via putpages in vm_object_page_clean this place gives a more final answer.

Note that for devfs vnodes the vnode lock is often not held when writes are started. This is esp. true when metadata io is initiated by UFS.

This revision is now accepted and ready to land.Aug 19 2019, 9:32 PM