svn commit: r201738 - stable/8/sys/kern

Konstantin Belousov kib at FreeBSD.org
Thu Jan 7 11:41:48 UTC 2010


Author: kib
Date: Thu Jan  7 11:41:47 2010
New Revision: 201738
URL: http://svn.freebsd.org/changeset/base/201738

Log:
  MFC r201347:
  Allow swap out of the kernel stack for the thread with priority greater
  or equial then PSOCK, not less or equial.

Modified:
  stable/8/sys/kern/sched_4bsd.c
  stable/8/sys/kern/sched_ule.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)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/kern/sched_4bsd.c
==============================================================================
--- stable/8/sys/kern/sched_4bsd.c	Thu Jan  7 11:33:57 2010	(r201737)
+++ stable/8/sys/kern/sched_4bsd.c	Thu Jan  7 11:41:47 2010	(r201738)
@@ -913,7 +913,7 @@ sched_sleep(struct thread *td, int pri)
 	td->td_sched->ts_slptime = 0;
 	if (pri)
 		sched_prio(td, pri);
-	if (TD_IS_SUSPENDED(td) || pri <= PSOCK)
+	if (TD_IS_SUSPENDED(td) || pri >= PSOCK)
 		td->td_flags |= TDF_CANSWAP;
 }
 

Modified: stable/8/sys/kern/sched_ule.c
==============================================================================
--- stable/8/sys/kern/sched_ule.c	Thu Jan  7 11:33:57 2010	(r201737)
+++ stable/8/sys/kern/sched_ule.c	Thu Jan  7 11:41:47 2010	(r201738)
@@ -1909,7 +1909,7 @@ sched_sleep(struct thread *td, int prio)
 	THREAD_LOCK_ASSERT(td, MA_OWNED);
 
 	td->td_slptick = ticks;
-	if (TD_IS_SUSPENDED(td) || prio <= PSOCK)
+	if (TD_IS_SUSPENDED(td) || prio >= PSOCK)
 		td->td_flags |= TDF_CANSWAP;
 	if (static_boost == 1 && prio)
 		sched_prio(td, prio);


More information about the svn-src-stable-8 mailing list