FreeBSD Bugzilla – Attachment 185947 Details for
Bug 221956
cam iosched: Schedule cam_iosched_ticker() quanta times per second
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
cam iosched: Schedule cam_iosched_ticker() quanta times per second
0004-cam-iosched-Schedule-cam_iosched_ticker-quanta-times-.diff (text/plain), 2.24 KB, created by
Fabian Keil
on 2017-08-31 10:21:10 UTC
(
hide
)
Description:
cam iosched: Schedule cam_iosched_ticker() quanta times per second
Filename:
MIME Type:
Creator:
Fabian Keil
Created:
2017-08-31 10:21:10 UTC
Size:
2.24 KB
patch
obsolete
>From eb82a8f272edcdaf4ef2c15b7a9b8fcff920c657 Mon Sep 17 00:00:00 2001 >From: Fabian Keil <fk@fabiankeil.de> >Date: Thu, 3 Aug 2017 11:54:24 +0200 >Subject: [PATCH 4/8] cam iosched: Schedule cam_iosched_ticker() quanta times > per second > >According to callout_reset(9), "[w]hen ticks is used, the callout is >scheduled to execute after ticks/hz seconds". > >It follows that to get quanta calls per second one should specify >a tick value of hz / isc->quanta. > >Previously the value was additionally reduced by one. > >As a result cam_iosched_ticker() was called more often than >requested by the user and expected by some of the limiters. > >On a system with hz=1000 a quanta value of 200 resulted in 250 >calls and a value of 100 in 111 calls. > >Without the unexplained tick reduction the number of calls matches >the quanta value reasonably well. > >Obtained from: ElectroBSD >--- > sys/cam/cam_iosched.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c >index 8d39c32511c8..f2e69d9fd84c 100644 >--- a/sys/cam/cam_iosched.c >+++ b/sys/cam/cam_iosched.c >@@ -533,7 +533,7 @@ cam_iosched_ticker(void *arg) > sbintime_t now, delta; > int pending; > >- callout_reset(&isc->ticker, hz / isc->quanta - 1, cam_iosched_ticker, isc); >+ callout_reset(&isc->ticker, hz / isc->quanta, cam_iosched_ticker, isc); > > now = sbinuptime(); > delta = now - isc->last_time; >@@ -795,7 +795,7 @@ cam_iosched_limiter_sysctl(SYSCTL_HANDLER_ARGS) > return error; > } > /* Note: disk load averate requires ticker to be always running */ >- callout_reset(&isc->ticker, hz / isc->quanta - 1, cam_iosched_ticker, isc); >+ callout_reset(&isc->ticker, hz / isc->quanta, cam_iosched_ticker, isc); > isc->flags |= CAM_IOSCHED_FLAG_CALLOUT_ACTIVE; > > cam_periph_unlock(isc->periph); >@@ -1031,7 +1031,7 @@ cam_iosched_init(struct cam_iosched_softc **iscp, struct cam_periph *periph) > callout_init_mtx(&(*iscp)->ticker, cam_periph_mtx(periph), 0); > (*iscp)->periph = periph; > cam_iosched_cl_init(&(*iscp)->cl, *iscp); >- callout_reset(&(*iscp)->ticker, hz / (*iscp)->quanta - 1, cam_iosched_ticker, *iscp); >+ callout_reset(&(*iscp)->ticker, hz / (*iscp)->quanta, cam_iosched_ticker, *iscp); > (*iscp)->flags |= CAM_IOSCHED_FLAG_CALLOUT_ACTIVE; > } > #endif >-- >2.14.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 221956
: 185947