From owner-cvs-all Tue Jul 30 1:12:37 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D01BE37B400; Tue, 30 Jul 2002 01:12:30 -0700 (PDT) Received: from mail.viasoft.com.cn (ip-167-164-97-218.anlai.com [218.97.164.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFC4743E6A; Tue, 30 Jul 2002 01:12:27 -0700 (PDT) (envelope-from davidx@viasoft.com.cn) Received: from slim.viasoft.com.cn (davidslim.viasoft.com.cn [192.168.1.204]) by mail.viasoft.com.cn (8.9.3/8.9.3) with ESMTP id QAA29923; Tue, 30 Jul 2002 16:29:16 +0800 Content-Type: text/plain; charset="iso-8859-1" From: David Xu Organization: VIA To: Seigo Tanimura , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern kern_condvar.c kern_switch.c kern_synch.c src/sys/sys proc.h src/sys/vm vm_glue.c Date: Tue, 30 Jul 2002 16:12:55 +0800 X-Mailer: KMail [version 1.4] References: <200207300654.g6U6s5tY099740@freefall.freebsd.org> In-Reply-To: <200207300654.g6U6s5tY099740@freefall.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200207301612.55467.davidx@viasoft.com.cn> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG could you look carefully timeout handing function? for example, cv_timedwait_end(), it has same problem with swapping. David Xu On Tuesday 30 July 2002 14:54, Seigo Tanimura wrote: > tanimura 2002/07/29 23:54:05 PDT > > Modified files: > sys/kern kern_condvar.c kern_switch.c kern_synch.c > sys/sys proc.h > sys/vm vm_glue.c > Log: > - Optimize wakeup() and its friends; if a thread waken up is being > swapped in, we do not have to ask for the scheduler thread to do > that. > > - Assert that a process is not swapped out in runq functions and > swapout(). > > - Introduce thread_safetoswapout() for readability. > > - In swapout_procs(), perform a test that may block (check of a > thread working on its vm map) first. This lets us call swapout() > with the sched_lock held, providing a better atomicity. > > Revision Changes Path > 1.27 +4 -2 src/sys/kern/kern_condvar.c > 1.35 +6 -0 src/sys/kern/kern_switch.c > 1.191 +12 -6 src/sys/kern/kern_synch.c > 1.233 +5 -0 src/sys/sys/proc.h > 1.150 +65 -64 src/sys/vm/vm_glue.c > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe cvs-all" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message