Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jun 2012 07:12:36 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r236546 - stable/9/sys/kern
Message-ID:  <201206040712.q547CaOt011828@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Jun  4 07:12:36 2012
New Revision: 236546
URL: http://svn.freebsd.org/changeset/base/236546

Log:
  MFC r232740:
  Make kern.sched.idlespinthresh default value adaptive depending of HZ.
  Otherwise with HZ above 8000 CPU may never skip timer ticks on idle.

Modified:
  stable/9/sys/kern/sched_ule.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/kern/sched_ule.c
==============================================================================
--- stable/9/sys/kern/sched_ule.c	Mon Jun  4 07:12:11 2012	(r236545)
+++ stable/9/sys/kern/sched_ule.c	Mon Jun  4 07:12:36 2012	(r236546)
@@ -212,7 +212,7 @@ static int preempt_thresh = 0;
 #endif
 static int static_boost = PRI_MIN_BATCH;
 static int sched_idlespins = 10000;
-static int sched_idlespinthresh = 16;
+static int sched_idlespinthresh = -1;
 
 /*
  * tdq - per processor runqs and statistics.  All fields are protected by the
@@ -1410,6 +1410,8 @@ sched_initticks(void *dummy)
 	steal_thresh = min(fls(mp_ncpus) - 1, 3);
 	affinity = SCHED_AFFINITY_DEFAULT;
 #endif
+	if (sched_idlespinthresh < 0)
+		sched_idlespinthresh = max(16, 2 * hz / realstathz);
 }
 
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206040712.q547CaOt011828>