Page MenuHomeFreeBSD

vfs: Move runningbufs delay to top of bufwrite
Needs ReviewPublic

Authored by imp on Fri, Mar 6, 12:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 9, 5:10 PM
Unknown Object (File)
Sun, Mar 8, 1:08 AM
Unknown Object (File)
Sat, Mar 7, 10:35 PM
Unknown Object (File)
Sat, Mar 7, 9:35 AM
Unknown Object (File)
Fri, Mar 6, 12:24 AM
Subscribers
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Before we'd schedule the write and then maybe wait after we've called
bstrategy, and we'd wake everybody up when the shortage
cleared. However, this thundering herd would be quite unfair and cause
problems.

Instead, move the delay to the start of bufwrite. If we're over
hirunningbuf, and we're scheduling an async I/O that's subject to the
runningbuf limits, sleep. Once we wakeup, check to see if we're below
the limit and wake up another one if we are. This should wakeup just
enough processes we don't suffer from a thundering herd.

In addition, if we're scheduling a synchronous I/O and we're over the
limit, also wakeup a async request to help limit the latency for those
requests.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 71212
Build 68095: arc lint + arc unit