Bug 221953 - cam iosched: Limit the quanta default to hz if it's below 200
Summary: cam iosched: Limit the quanta default to hz if it's below 200
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-scsi (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-08-31 10:14 UTC by Fabian Keil
Modified: 2017-09-14 08:39 UTC (History)
3 users (show)

See Also:
fk: mfc-stable11?


Attachments
cam iosched: Limit the quanta default to hz if it's below 200 (1.19 KB, patch)
2017-08-31 10:14 UTC, Fabian Keil
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Keil 2017-08-31 10:14:21 UTC
Created attachment 185945 [details]
cam iosched: Limit the quanta default to hz if it's below 200

The attached patch limits the quanta default to hz if it's below 200

Previously the quanta default was always 200 while hz defaults
to 100 when running in a vm.

The cam_iosched_ticker() can't be scheduled more than once per tick
and some of the limiters depend on quanta matching the number of calls
per second to enforce the proper limits.

Obtained from: ElectroBSD
Comment 1 Warner Losh freebsd_committer freebsd_triage 2017-09-01 00:57:13 UTC
This looks good to me.
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-09-12 23:47:20 UTC
A commit references this bug:

Author: imp
Date: Tue Sep 12 23:46:33 UTC 2017
New revision: 323511
URL: https://svnweb.freebsd.org/changeset/base/323511

Log:
  cam iosched: Limit the quanta default to hz if it's below 200

  The cam_iosched_ticker() can't be scheduled more than once per tick.
  Some limiters depend on quanta matching the number of calls per second
  to enforce the proper limits. Limit the quanta to no faster than 1 per
  clock tick. This fixes some features when running in VMs where the
  default HZ is 100.

  PR: 221953
  Obtained from: ElectroBSD
  Differential Revision: https://reviews.freebsd.org/D12337
  Submitted by: Fabian Keil

Changes:
  head/sys/cam/cam_iosched.c