From owner-svn-src-stable@FreeBSD.ORG Thu Jan 27 20:09:21 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C19BB1065674; Thu, 27 Jan 2011 20:09:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 960268FC12; Thu, 27 Jan 2011 20:09:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0RK9LjW033792; Thu, 27 Jan 2011 20:09:21 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0RK9LMR033789; Thu, 27 Jan 2011 20:09:21 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201101272009.p0RK9LMR033789@svn.freebsd.org> From: John Baldwin Date: Thu, 27 Jan 2011 20:09:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217975 - in stable/8/sys: kern net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jan 2011 20:09:21 -0000 Author: jhb Date: Thu Jan 27 20:09:20 2011 New Revision: 217975 URL: http://svn.freebsd.org/changeset/base/217975 Log: MFC 217076: - Restore dropping the priority of syncer down to PPAUSE when it is idle. This was lost when it was converted to using a condition variable instead of lbolt. - Drop the priority of flowtable down to PPAUSE when it is idle as well since it is a similar background task. Modified: stable/8/sys/kern/vfs_subr.c stable/8/sys/net/flowtable.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/vfs_subr.c ============================================================================== --- stable/8/sys/kern/vfs_subr.c Thu Jan 27 20:08:14 2011 (r217974) +++ stable/8/sys/kern/vfs_subr.c Thu Jan 27 20:09:20 2011 (r217975) @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1883,6 +1884,12 @@ sched_sync(void) * matter as we are just trying to generally pace the * filesystem activity. */ + if (syncer_state != SYNCER_RUNNING || + time_uptime == starttime) { + thread_lock(td); + sched_prio(td, PPAUSE); + thread_unlock(td); + } if (syncer_state != SYNCER_RUNNING) cv_timedwait(&sync_wakeup, &sync_mtx, hz / SYNCER_SHUTDOWN_SPEEDUP); Modified: stable/8/sys/net/flowtable.c ============================================================================== --- stable/8/sys/net/flowtable.c Thu Jan 27 20:08:14 2011 (r217974) +++ stable/8/sys/net/flowtable.c Thu Jan 27 20:09:20 2011 (r217975) @@ -1548,9 +1548,11 @@ static void flowtable_cleaner(void) { VNET_ITERATOR_DECL(vnet_iter); + struct thread *td; if (bootverbose) log(LOG_INFO, "flowtable cleaner started\n"); + td = curthread; while (1) { VNET_LIST_RLOCK(); VNET_FOREACH(vnet_iter) { @@ -1565,6 +1567,9 @@ flowtable_cleaner(void) * is arbitrary */ mtx_lock(&flowclean_lock); + thread_lock(td); + sched_prio(td, PPAUSE); + thread_unlock(td); flowclean_cycles++; cv_broadcast(&flowclean_f_cv); cv_timedwait(&flowclean_c_cv, &flowclean_lock, flowclean_freq);