From owner-svn-src-all@freebsd.org Tue Sep 20 09:18:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BB05BE28B5; Tue, 20 Sep 2016 09:18:34 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 511D8E6B; Tue, 20 Sep 2016 09:18:34 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8K9IXu6023247; Tue, 20 Sep 2016 09:18:33 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8K9IXOZ023246; Tue, 20 Sep 2016 09:18:33 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201609200918.u8K9IXOZ023246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 20 Sep 2016 09:18:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306018 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 09:18:34 -0000 Author: trasz Date: Tue Sep 20 09:18:33 2016 New Revision: 306018 URL: https://svnweb.freebsd.org/changeset/base/306018 Log: 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 Modified: head/sys/geom/geom_io.c Modified: head/sys/geom/geom_io.c ============================================================================== --- head/sys/geom/geom_io.c Tue Sep 20 08:56:50 2016 (r306017) +++ head/sys/geom/geom_io.c Tue Sep 20 09:18:33 2016 (r306018) @@ -69,7 +69,6 @@ static int g_io_transient_map_bio(struct 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(); } }