From b3fc94f8c1bfed01122939b667be237256711fe3 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Mon, 20 Feb 2012 12:58:50 +0100 Subject: [PATCH] dsched(4): Some miscellaneous cleanup. * Rename the bfq manpage to dsched_bfq(4), so that we don't run into name conflicts in the future. If someone wrote a manpage for dsched_as, it would have resulted in an as(4) manpage. * Add options DSCHED_AS and DSCHED_BFQ to LINT*. * Also, remove an unneeded check in dsched_as. --- Makefile_upgrade.inc | 2 ++ share/man/man4/Makefile | 2 +- share/man/man4/dsched.4 | 2 +- share/man/man4/{bfq.4 => dsched_bfq.4} | 4 ++-- sys/conf/files | 1 + sys/conf/options | 3 ++- sys/config/LINT | 3 ++- sys/config/LINT64 | 2 ++ sys/kern/dsched/as/as.c | 2 +- 9 files changed, 14 insertions(+), 7 deletions(-) rename share/man/man4/{bfq.4 => dsched_bfq.4} (99%) diff --git a/Makefile_upgrade.inc b/Makefile_upgrade.inc index e12e28e7a3..74fe418d59 100644 --- a/Makefile_upgrade.inc +++ b/Makefile_upgrade.inc @@ -1977,6 +1977,8 @@ TO_REMOVE+=/usr/share/man/man8/isdntrace.8.gz TO_REMOVE+=/usr/libexec/binutils221/elf/ld TO_REMOVE+=/usr/libexec/binutils222/elf/ld TO_REMOVE+=/usr/include/sys/dataacq.h +TO_REMOVE+=/usr/share/man/cat4/bfq.4.gz +TO_REMOVE+=/usr/share/man/man4/bfq.4.gz .if ${MACHINE_ARCH} == "x86_64" TO_REMOVE+=/usr/libdata/stallion/2681.sys diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 7533edd7fe..61f77ef537 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -42,7 +42,6 @@ MAN= aac.4 \ axe.4 \ bce.4 \ bfe.4 \ - bfq.4 \ bge.4 \ bktr.4 \ blackhole.4 \ @@ -75,6 +74,7 @@ MAN= aac.4 \ dpt.4 \ drm.4 \ dsched.4 \ + dsched_bfq.4 \ dummynet.4 \ ecc.4 \ ed.4 \ diff --git a/share/man/man4/dsched.4 b/share/man/man4/dsched.4 index 70a8d6a341..9bd02f3228 100644 --- a/share/man/man4/dsched.4 +++ b/share/man/man4/dsched.4 @@ -63,7 +63,7 @@ The following are informative only: shows all available dsched policies, separated by spaces. .El .Sh SEE ALSO -.Xr bfq 4 , +.Xr dsched_bfq 4 , .Xr loader.conf 5 , .Xr sysctl.conf 5 , .Xr dsched 9 diff --git a/share/man/man4/bfq.4 b/share/man/man4/dsched_bfq.4 similarity index 99% rename from share/man/man4/bfq.4 rename to share/man/man4/dsched_bfq.4 index 30105a55d5..d8f3ecb9a0 100644 --- a/share/man/man4/bfq.4 +++ b/share/man/man4/dsched_bfq.4 @@ -30,10 +30,10 @@ .\" SUCH DAMAGE. .\" .Dd August 19, 2011 -.Dt BFQ 8 +.Dt DSCHED_BFQ 4 .Os .Sh NAME -.Nm BFQ +.Nm dsched_bfq .Nd Budget Fair Queueing disk scheduling policy .Sh SYNOPSIS To compile this driver into the kernel, diff --git a/sys/conf/files b/sys/conf/files index ef876f0296..870047ca51 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1991,6 +1991,7 @@ ${OSACPI_MI_DIR}/acpi_video/acpi_video.c optional acpi_video acpi ${OSACPI_MI_DIR}/aibs/atk0110.c optional aibs acpi # dsched stuff +kern/dsched/as/as.c optional dsched_as kern/dsched/fq/fq_core.c optional dsched_fq kern/dsched/fq/fq_diskops.c optional dsched_fq kern/dsched/bfq/bfq.c optional dsched_bfq diff --git a/sys/conf/options b/sys/conf/options index 8604e186b6..e19094cdf7 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -652,8 +652,9 @@ SCTP_MAP_LOGGING opt_sctp.h SYSLINK opt_syslink.h # DSCHED stuff -DSCHED_FQ opt_dsched.h +DSCHED_AS opt_dsched.h DSCHED_BFQ opt_dsched.h +DSCHED_FQ opt_dsched.h # Receive Side Scaling (now basecode) RSS_DEBUG opt_rss.h diff --git a/sys/config/LINT b/sys/config/LINT index ba29df4180..5467c5c56f 100644 --- a/sys/config/LINT +++ b/sys/config/LINT @@ -2585,8 +2585,9 @@ options SCTP_FR_LOGGING options SCTP_MAP_LOGGING # DSCHED stuff -options DSCHED_FQ +options DSCHED_AS options DSCHED_BFQ +options DSCHED_FQ # WATCHDOG options WATCHDOG_ENABLE # Enable watchdog support framework diff --git a/sys/config/LINT64 b/sys/config/LINT64 index e34990b492..6697cddbf9 100644 --- a/sys/config/LINT64 +++ b/sys/config/LINT64 @@ -2354,6 +2354,8 @@ options SCTP_FR_LOGGING options SCTP_MAP_LOGGING # DSCHED stuff +options DSCHED_AS +options DSCHED_BFQ options DSCHED_FQ # WATCHDOG diff --git a/sys/kern/dsched/as/as.c b/sys/kern/dsched/as/as.c index 449f4adc70..0f3d51f4ad 100644 --- a/sys/kern/dsched/as/as.c +++ b/sys/kern/dsched/as/as.c @@ -195,7 +195,7 @@ as_dequeue(struct dsched_disk_ctx *diskctx) bio = TAILQ_FIRST(&as_diskctx->as_queue_rd); tdio = dsched_get_bio_priv(bio); //kernel thread - if (!tdio->p || (uint32_t)(tdio->p) == ~0){ + if (!tdio->p) { TAILQ_REMOVE(&as_diskctx->as_queue_rd, bio, link); dsched_strategy_request_polling(as_diskctx->head.dp, bio, diskctx); } else { -- 2.41.0