Bug 221974

Summary: cam iosched: The iops limiter should enforce limits below the quanta value and should not discard 'unspent' ios
Product: Base System Reporter: Fabian Keil <fk>
Component: kernAssignee: Warner Losh <imp>
Status: Closed FIXED    
Severity: Affects Some People CC: emaste, imp
Priority: --- Keywords: patch
Version: CURRENTFlags: fk: mfc-stable11?
Hardware: Any   
OS: Any   
Attachments:
Description Flags
cam iosched: Enforce iop limits below the quanta value and preserve "unspent" ios none

Description Fabian Keil 2017-09-01 10:30:19 UTC
Created attachment 185971 [details]
cam iosched: Enforce iop limits below the quanta value and preserve "unspent" ios

Currently the iops limiter allows at least one iop per tick, as a result
limits below the quanta value aren't enforced.

ios that aren't used between ticks are lost, as a result the iops limiter
can enforce a limit significantly below the configured maximum.

The attached patch set fixes both issues.

Obtained from: ElectroBSD
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-09-22 02:37:10 UTC
A commit references this bug:

Author: imp
Date: Fri Sep 22 02:36:32 UTC 2017
New revision: 323893
URL: https://svnweb.freebsd.org/changeset/base/323893

Log:
  cam iosched: Enforce iop limits below the quanta value

  Previously the iops limiter would always allow at least
  quanta ios per second as cam_iosched_iops_tick() never set
  ios->l_value1 below 1.

  Submitted by: Fabian Keil <fk@fabiankeil.de>
  Obtained from: ElectroBSD
  PR: 221974

Changes:
  head/sys/cam/cam_iosched.c
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-09-22 02:37:12 UTC
A commit references this bug:

Author: imp
Date: Fri Sep 22 02:36:36 UTC 2017
New revision: 323894
URL: https://svnweb.freebsd.org/changeset/base/323894

Log:
  cam iosched: Bettar account IOPS for smoother performance

  Prevent cam_iosched_iops_tick() from discarding 'unspent' ios unless
  it's a new accounting interval.

  Previously ios that weren't used between ticks were lost, as a result
  the iops limiter could enforce a limit below the configured maximum.

  Obtained from: ElectroBSD
  Submitted by: Fabian Keil
  PR: 221974

Changes:
  head/sys/cam/cam_iosched.c
Comment 3 Ed Maste freebsd_committer freebsd_triage 2018-12-04 14:12:38 UTC
imp, MFC plans?
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2020-07-11 03:12:08 UTC
^Triage: Assign to committer resolving

With bugmeister hat, I think any possible MFCs from 3 years ago are OBE.