aboutsummaryrefslogtreecommitdiff
path: root/sys/geom
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2016-09-20 09:18:33 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2016-09-20 09:18:33 +0000
commit0c4440c3aafe64fbc8ba3c6c63a0915d6b90a6ea (patch)
treeed3aeb5d6446044d0ca32840eacc31a6ff90ef61 /sys/geom
parentfa8c981396ab6224bb2cd2aae12d2906dbaccfb8 (diff)
downloadsrc-0c4440c3aafe64fbc8ba3c6c63a0915d6b90a6ea.tar.gz
src-0c4440c3aafe64fbc8ba3c6c63a0915d6b90a6ea.zip
Follow up r305988 by removing g_bio_run_task and related code.
The g_io_schedule_up() gets its "if" condition swapped to make it more similar to g_io_schedule_down(). Suggested by: mav@ Reviewed by: mav@ MFC after: 1 month
Notes
Notes: svn path=/head/; revision=306018
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/geom_io.c34
1 files changed, 12 insertions, 22 deletions
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c
index d8f9302848ff..dbb346842df7 100644
--- a/sys/geom/geom_io.c
+++ b/sys/geom/geom_io.c
@@ -69,7 +69,6 @@ static int g_io_transient_map_bio(struct bio *bp);
static struct g_bioq g_bio_run_down;
static struct g_bioq g_bio_run_up;
-static struct g_bioq g_bio_run_task;
/*
* Pace is a hint that we've had some trouble recently allocating
@@ -280,7 +279,6 @@ g_io_init()
g_bioq_init(&g_bio_run_down);
g_bioq_init(&g_bio_run_up);
- g_bioq_init(&g_bio_run_task);
biozone = uma_zcreate("g_bio", sizeof (struct bio),
NULL, NULL,
NULL, NULL,
@@ -887,31 +885,23 @@ void
g_io_schedule_up(struct thread *tp __unused)
{
struct bio *bp;
+
for(;;) {
g_bioq_lock(&g_bio_run_up);
- bp = g_bioq_first(&g_bio_run_task);
- if (bp != NULL) {
- g_bioq_unlock(&g_bio_run_up);
- THREAD_NO_SLEEPING();
- CTR1(KTR_GEOM, "g_up processing task bp %p", bp);
- bp->bio_task(bp->bio_task_arg);
- THREAD_SLEEPING_OK();
- continue;
- }
bp = g_bioq_first(&g_bio_run_up);
- if (bp != NULL) {
- g_bioq_unlock(&g_bio_run_up);
- THREAD_NO_SLEEPING();
- CTR4(KTR_GEOM, "g_up biodone bp %p provider %s off "
- "%jd len %ld", bp, bp->bio_to->name,
- bp->bio_offset, bp->bio_length);
- biodone(bp);
- THREAD_SLEEPING_OK();
+ if (bp == NULL) {
+ CTR0(KTR_GEOM, "g_up going to sleep");
+ msleep(&g_wait_up, &g_bio_run_up.bio_queue_lock,
+ PRIBIO | PDROP, "-", 0);
continue;
}
- CTR0(KTR_GEOM, "g_up going to sleep");
- msleep(&g_wait_up, &g_bio_run_up.bio_queue_lock,
- PRIBIO | PDROP, "-", 0);
+ g_bioq_unlock(&g_bio_run_up);
+ THREAD_NO_SLEEPING();
+ CTR4(KTR_GEOM, "g_up biodone bp %p provider %s off "
+ "%jd len %ld", bp, bp->bio_to->name,
+ bp->bio_offset, bp->bio_length);
+ biodone(bp);
+ THREAD_SLEEPING_OK();
}
}