From owner-cvs-all@FreeBSD.ORG Thu Mar 20 09:32:51 2008 Return-Path: Delivered-To: cvs-all@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 881C61065673; Thu, 20 Mar 2008 09:32:51 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 812268FC1A; Thu, 20 Mar 2008 09:32:51 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from apple.my.domain (root@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m2K9WiC2017055; Thu, 20 Mar 2008 09:32:46 GMT (envelope-from davidxu@freebsd.org) Message-ID: <47E22F8E.90703@freebsd.org> Date: Thu, 20 Mar 2008 17:34:06 +0800 From: David Xu User-Agent: Thunderbird 2.0.0.9 (X11/20071211) MIME-Version: 1.0 To: Jeff Roberson References: <200803190735.m2J7ZEhO000502@repoman.freebsd.org> <47E0C49D.8010807@freebsd.org> <20080318220908.R910@desktop> <20080319225243.G910@desktop> In-Reply-To: <20080319225243.G910@desktop> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: cvs-src@FreeBSD.org, Jeff Roberson , src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern subr_sleepqueue.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Mar 2008 09:32:51 -0000 Jeff Roberson wrote: > > On Tue, 18 Mar 2008, Jeff Roberson wrote: > >> On Wed, 19 Mar 2008, David Xu wrote: >> >>> Jeff Roberson wrote: >>>> jeff 2008-03-19 07:35:14 UTC >>>> >>>> FreeBSD src repository >>>> >>>> Modified files: >>>> sys/kern subr_sleepqueue.c Log: >>>> - At the top of sleepq_catch_signals() lock the thread and check >>>> TDF_NEEDSIGCHK >>>> before doing the very expensive cursig() and related locking. >>>> NEEDSIGCHK >>>> is updated whenever our signal mask change or when a signal is >>>> delivered and >>>> should be sufficient to avoid the more expensive tests. This >>>> eliminates >>>> another source of PROC_LOCK contention in multithreaded programs. >>>> Revision Changes Path >>>> 1.50 +12 -4 src/sys/kern/subr_sleepqueue.c >>>> >>> >>> This may break process suspension, a more completed patch is here: >>> (though it is outdated): >>> >>> http://people.freebsd.org/~davidxu/patch/PCATCH_optimize.patch >>> >>> In one word, process suspending may be in progress, and the thread >>> should check it. >> >> Thanks Xu. I will add your NEEDSUSPCHECK flag and check that as well. > > http://people.freebsd.org/~jeff/suspchk.diff > > Can you review this diff? I rely on ast() to check and clear the flag > as we do with NEEDSIGCHK. I removed the check from userret() as we > don't need to do it every time now. > > Thanks, > Jeff > It looks okay to me, the code looks more clean than KSE time. Regards, David Xu