Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/librumpuser use nwork-adjusted amount of idle workers to...



details:   https://anonhg.NetBSD.org/src/rev/385a2f843955
branches:  trunk
changeset: 763001:385a2f843955
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Mar 07 21:57:15 2011 +0000

description:
use nwork-adjusted amount of idle workers to decide is they are truly idle.

diffstat:

 lib/librumpuser/rumpuser_sp.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 4ea66b8277e6 -r 385a2f843955 lib/librumpuser/rumpuser_sp.c
--- a/lib/librumpuser/rumpuser_sp.c     Mon Mar 07 21:04:47 2011 +0000
+++ b/lib/librumpuser/rumpuser_sp.c     Mon Mar 07 21:57:15 2011 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: rumpuser_sp.c,v 1.42 2011/02/15 16:10:41 pooka Exp $  */
+/*      $NetBSD: rumpuser_sp.c,v 1.43 2011/03/07 21:57:15 pooka Exp $  */
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: rumpuser_sp.c,v 1.42 2011/02/15 16:10:41 pooka Exp $");
+__RCSID("$NetBSD: rumpuser_sp.c,v 1.43 2011/03/07 21:57:15 pooka Exp $");
 
 #include <sys/types.h>
 #include <sys/atomic.h>
@@ -623,7 +623,7 @@
 
        for (;;) {
                pthread_mutex_lock(&sbamtx);
-               if (__predict_false(idleworker >= rumpsp_idleworker)) {
+               if (__predict_false(idleworker - nwork >= rumpsp_idleworker)) {
                        nworker--;
                        pthread_mutex_unlock(&sbamtx);
                        break;



Home | Main Index | Thread Index | Old Index