From owner-freebsd-threads@FreeBSD.ORG Mon Dec 21 07:45:46 2009 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A2B5106566B for ; Mon, 21 Dec 2009 07:45:46 +0000 (UTC) (envelope-from leonleon77@gmail.com) Received: from mail-iw0-f198.google.com (mail-iw0-f198.google.com [209.85.223.198]) by mx1.freebsd.org (Postfix) with ESMTP id D61C18FC2A for ; Mon, 21 Dec 2009 07:45:45 +0000 (UTC) Received: by iwn36 with SMTP id 36so3434120iwn.3 for ; Sun, 20 Dec 2009 23:45:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=h2k1grUa/Qy/4PHaDMvn0R5agdRrAFKjYxgDsbYYbK0=; b=clWJ6sAujsCp/5lTNWXpkt4F4ucgV8s3UIP0HZh4i6acXmlJMpkzLNUFXlmz87ShQw kgxfken0a9+OQVvAFCP6pbafUYWVzR1vRkGz+JpgbWitkfD7HgS4gqtcbz5eD4Q3jdDT SOupnAkZavKpGEVGxtRxePsKh/yrrsC2mCloI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=xAcj5hDPAggBmV8Oa0h/tg6Ubt1DzUAnyNBO064PD/F54j6jbI0Rr90WcHAZM9f4Ol AYeY/Z925IDBkCKJHeis2chUpa+Szs8NsRBjToBA7irJxOSmN3m/i1Wciqi48nVMFhmW vxqQGNL0dTU4veNUb+mrsyR5VWgTQLjZgic1o= MIME-Version: 1.0 Received: by 10.231.167.212 with SMTP id r20mr99076iby.7.1261379713313; Sun, 20 Dec 2009 23:15:13 -0800 (PST) Date: Mon, 21 Dec 2009 18:15:13 +1100 Message-ID: <26d2cb010912202315g574353d9g872643d1717f4f86@mail.gmail.com> From: leon zadorin To: freebsd-threads@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: disable threads when recompiling libc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Dec 2009 07:45:46 -0000 Hi, is it possible to configure libc to be recompiled in a single-threaded model only (i.e. disable any additional overhead for handling thread-safety). Basically what I'd like to do is to build a separate non-multithreaded copy of libc and use it with the rest of "single threaded environment": recompiled gcc (./configure --disable-threads), etc. c++ boost libs in non-multithreaded mode and so on I would like to see if there are any additional performance-benefits to this (my program does not need to be multi-threaded). I think compiler itself can produce more optimisations (various speculative loads et al) if it is building code for single-threaded model only... I wonder if there are also "single-threaded" performance benefits to libc et al ?