From owner-freebsd-current@FreeBSD.ORG Tue Nov 30 06:30:16 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BFCE106564A; Tue, 30 Nov 2010 06:30:16 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id BD36C8FC19; Tue, 30 Nov 2010 06:30:15 +0000 (UTC) Received: by wyf19 with SMTP id 19so5280703wyf.13 for ; Mon, 29 Nov 2010 22:30:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=Kqe4MolyF4kc/gPYzSVGm2TPqUbwFGl4VL6UHGrTNAw=; b=cPedo2Q3Hy5o06wHE0K2jWugRFvSshZPv3m2CTu6HwU3oOUDDneXrI6bOItjLQxDZD dhlX++6CHWRupn+mYQk6IJ8Ec2ZebmQO25SzP6laEEnM9waKsSnGoPNfojz0nVJo+URx ocLEOXRk0NcKQJy26xs1KA0Fsc3meLccI+a4Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=TmXkcWbJRuulmaGMC+3V698TO4nhqOzXVEitsrfvVxpG8phlSe/ehBVNuIRk6EYG6e qdm2gNo6APqcAPawIAM6ojMFJh7+buPdp6cwsa1Ldn+HuV37Q0xaIrBsIlmSfrLI8EVr OVtxJ9+gWK5ZX+U64ppkr2430Vq/RuAx2AlXc= MIME-Version: 1.0 Received: by 10.227.138.132 with SMTP id a4mr7106550wbu.143.1291098613627; Mon, 29 Nov 2010 22:30:13 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.198.27 with HTTP; Mon, 29 Nov 2010 22:30:13 -0800 (PST) In-Reply-To: <4CF4901B.8030108@freebsd.org> References: <4CF4901B.8030108@freebsd.org> Date: Mon, 29 Nov 2010 22:30:13 -0800 X-Google-Sender-Auth: H3O1jPXUxx6ZOSnrn7dPQ-jp4Gk Message-ID: From: Garrett Cooper To: David Xu Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Current Subject: Re: CFT: patch for process shared pthread objects X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Nov 2010 06:30:16 -0000 On Mon, Nov 29, 2010 at 9:48 PM, David Xu wrote: > Hi, > > I finally have worked out first patch to make our pthread library > support process shared pthread objects: > > http://people.freebsd.org/~davidxu/pshared/patch1.diff > > Many changes are related to redesigned pthread condition variable, > these changes try to eliminate extra context switch when > pthread_cond_signal is called which could reduce performance. > There are two parts in the condition variable implementation. > A pure usermode condition variable and kernel-based condition > variable. All priority protected, inherited mutexs and process > shared mutex will use kernel base condition variable, for a > normal mutex, the usermode condition variable is used. > Both user-mode and kernel-based try to migrate a thread from > condition variable wait queue to mutex wait queue. > > Another added feature is robust mutex support, > http://www.opengroup.org/onlinepubs/9699919799/functions/pthread_mutexattr_setrobust.html > Which I think is mostly used for process-shared mutex. > > In the patch, if mutex attribute is robust, the thread library > also uses kernel base condition variable which does not have > internal lock in userland. Doesn't build :/...: ===> lib/libthr (obj,depend,all,install) make: don't know how to make thr_sleepq.c. Stop *** Error code 2 Stop in /usr/src. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. Thanks, -Garrett