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
This commit is contained in:
parent
fa8c981396
commit
0c4440c3aa
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user