From 321c12209bb4ce52d40fc15bd38e99dc8b59e260 Mon Sep 17 00:00:00 2001 From: ad Date: Wed, 25 Jun 2008 19:20:56 +0000 Subject: [PATCH] Don't swap kernel stacks of realtime threads. --- sys/uvm/uvm_glue.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/uvm/uvm_glue.c b/sys/uvm/uvm_glue.c index 820c355b9215..4ff7ae643718 100644 --- a/sys/uvm/uvm_glue.c +++ b/sys/uvm/uvm_glue.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_glue.c,v 1.132 2008/06/16 10:19:57 ad Exp $ */ +/* $NetBSD: uvm_glue.c,v 1.133 2008/06/25 19:20:56 ad Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.132 2008/06/16 10:19:57 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.133 2008/06/25 19:20:56 ad Exp $"); #include "opt_coredump.h" #include "opt_kgdb.h" @@ -608,6 +608,8 @@ swappable(struct lwp *l) return false; if (l->l_holdcnt != 0) return false; + if (l->l_class != SCHED_OTHER) + return false; if (l->l_syncobj == &rw_syncobj || l->l_syncobj == &mutex_syncobj) return false; if (l->l_proc->p_stat != SACTIVE && l->l_proc->p_stat != SSTOP)