Date: Tue, 12 Sep 2017 23:46:33 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323511 - head/sys/cam Message-ID: <201709122346.v8CNkX6A092486@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Tue Sep 12 23:46:33 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 Modified: head/sys/cam/cam_iosched.c Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Tue Sep 12 23:42:52 2017 (r323510) +++ head/sys/cam/cam_iosched.c Tue Sep 12 23:46:33 2017 (r323511) @@ -1022,7 +1022,7 @@ cam_iosched_init(struct cam_iosched_softc **iscp, stru bioq_init(&(*iscp)->write_queue); (*iscp)->read_bias = 100; (*iscp)->current_read_bias = 100; - (*iscp)->quanta = 200; + (*iscp)->quanta = min(hz, 200); cam_iosched_iop_stats_init(*iscp, &(*iscp)->read_stats); cam_iosched_iop_stats_init(*iscp, &(*iscp)->write_stats); cam_iosched_iop_stats_init(*iscp, &(*iscp)->trim_stats);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709122346.v8CNkX6A092486>