svn commit: r334229 - stable/11/sys/cam

Ivan Klymenko fidaj at ukr.net
Sun May 27 08:32:56 UTC 2018


В Fri, 25 May 2018 23:18:06 +0000 (UTC)
Sean Bruno <sbruno at FreeBSD.org> пишет:

> Author: sbruno
> Date: Fri May 25 23:18:06 2018
> New Revision: 334229
> URL: https://svnweb.freebsd.org/changeset/base/334229
> 
> Log:
>   MFC r323829
>     cam iosched: Add a handler for the quanta sysctl to enforce valid
>                  values
>   
>   MFC r323831
>       cam iosched: Schedule cam_iosched_ticker() quanta times per
> second 
>   PR:		221956 221957
>   Submitted by:	imp
>   Approved by:	re (marius)
> 
> Modified:
>   stable/11/sys/cam/cam_iosched.c
> Directory Properties:
>   stable/11/   (props changed)
> 
> Modified: stable/11/sys/cam/cam_iosched.c
> ==============================================================================
> --- stable/11/sys/cam/cam_iosched.c	Fri May 25 21:46:53
> 2018	(r334228) +++ stable/11/sys/cam/cam_iosched.c	Fri
> May 25 23:18:06 2018	(r334229) @@ -510,7 +510,7 @@
> cam_iosched_ticker(void *arg) struct cam_iosched_softc *isc = arg;
>  	sbintime_t now, delta;
>  
> -	callout_reset(&isc->ticker, hz / isc->quanta - 1,
> cam_iosched_ticker, isc);
> +	callout_reset(&isc->ticker, hz / isc->quanta1,
> cam_iosched_ticker, isc); 
>  	now = sbinuptime();
>  	delta = now - isc->last_time;
> @@ -753,7 +753,7 @@ cam_iosched_limiter_sysctl(SYSCTL_HANDLER_ARGS)
>  			}
>  		} else {
>  			if (cantick != 0) {
> -				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; }
>  		}
> @@ -821,6 +821,27 @@ cam_iosched_sbintime_sysctl(SYSCTL_HANDLER_ARGS)
>  	return 0;
>  }
>  
> +static int
> +cam_iosched_quanta_sysctl(SYSCTL_HANDLER_ARGS)
> +{
> +	int *quanta;
> +	int error, value;
> +
> +	quanta = (unsigned *)arg1;
> +	value = *quanta;
> +
> +	error = sysctl_handle_int(oidp, (int *)&value, 0, req);
> +	if ((error != 0) || (req->newptr == NULL))
> +		return (error);
> +
> +	if (value < 1 || value > hz)
> +		return (EINVAL);
> +
> +	*quanta = value;
> +
> +	return (0);
> +}
> +
>  static void
>  cam_iosched_iop_stats_sysctl_init(struct cam_iosched_softc *isc,
> struct iop_stats *ios, char *name) {
> @@ -971,7 +992,7 @@ cam_iosched_init(struct cam_iosched_softc **iscp,
> stru 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
> @@ -1042,9 +1063,9 @@ void cam_iosched_sysctl_init(struct
> cam_iosched_softc &isc->read_bias, 100,
>  	    "How biased towards read should we be independent of
> limits"); 
> -	SYSCTL_ADD_INT(ctx, n,
> -	    OID_AUTO, "quanta", CTLFLAG_RW,
> -	    &isc->quanta, 200,
> +	SYSCTL_ADD_PROC(ctx, n,
> +	    OID_AUTO, "quanta", CTLTYPE_UINT | CTLFLAG_RW,
> +	    &isc->quanta, 0, cam_iosched_quanta_sysctl, "I",
>  	    "How many quanta per second do we slice the I/O up
> into"); 
>  	SYSCTL_ADD_INT(ctx, n,


...
--- cam_iosched.o ---
/usr/local/libexec/ccache/world/cc -target i386-unknown-freebsd11.2 --sysroot=/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin -O2 -pipe -O3 -fvectorize -fslp-vectorize -fblocks -march=native  -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/k11/opt_global.h -I. -I/usr/src/sys -fno-common -g -I/usr/obj/usr/src/sys/k11   -MD  -MF.depend.cam_iosched.o -MTcam_iosched.o -mno-mmx -mno-sse -msoft-float -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-error-address-of-packed-member  -Ofast -fvectorize -fslp-vectorize -fblocks -fcolor-diagnostics -mno-aes -mno-avx  -std=iso9899:1999 -c /usr/src/sys/cam/cam_iosched.c -o cam_iosched.o
/usr/src/sys/cam/cam_iosched.c:513:40: error: no member named 'quanta1' in 'struct cam_iosched_softc'; did you mean 'quanta'?
        callout_reset(&isc->ticker, hz / isc->quanta1, cam_iosched_ticker, isc);
                                              ^~~~~~~
                                              quanta
/usr/src/sys/sys/callout.h:115:28: note: expanded from macro 'callout_reset'
    callout_reset_on((c), (on_tick), (fn), (arg), -1)
                           ^
/usr/src/sys/sys/callout.h:112:43: note: expanded from macro 'callout_reset_on'
    callout_reset_sbt_on((c), tick_sbt * (to_ticks), 0, (fn), (arg),    \
                                          ^
/usr/src/sys/cam/cam_iosched.c:267:7: note: 'quanta' declared here
        int             quanta;                 /* Number of quanta per second */
                        ^
1 error generated.
*** [cam_iosched.o] Error code 1

make[4]: stopped in /usr/src/sys/modules/cam
1 error

make[4]: stopped in /usr/src/sys/modules/cam
*** [all_subdir_cam] Error code 2

make[3]: stopped in /usr/src/sys/modules
--- all_subdir_bxe ---
ctfconvert -L VERSION -g 57712_init_values.o
A failure has been detected in another branch of the parallel make

make[4]: stopped in /usr/src/sys/modules/bxe
*** [all_subdir_bxe] Error code 2

make[3]: stopped in /usr/src/sys/modules
2 errors

make[3]: stopped in /usr/src/sys/modules
*** [modules-all] Error code 2

make[2]: stopped in /usr/obj/usr/src/sys/k11
1 error

make[2]: stopped in /usr/obj/usr/src/sys/k11
*** [buildkernel] Error code 2

make[1]: stopped in /usr/src
1 error

make[1]: stopped in /usr/src
*** [buildkernel] Error code 2

make: stopped in /usr/src
1 error

make: stopped in /usr/src
Press any key to continue...


More information about the svn-src-stable mailing list