Bug 221953

Summary: cam iosched: Limit the quanta default to hz if it's below 200
Product: Base System Reporter: Fabian Keil <fk>
Component: kernAssignee: freebsd-scsi (Nobody) <scsi>
Status: Closed FIXED    
Severity: Affects Some People CC: cem, emaste, imp
Priority: --- Keywords: patch
Version: CURRENTFlags: fk: mfc-stable11?
Hardware: Any   
OS: Any   
Attachments:
Description Flags
cam iosched: Limit the quanta default to hz if it's below 200 none

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