Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 19628 invoked from network); 29 Jul 2007 22:33:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Jul 2007 22:33:55 -0000 Received: (qmail 13089 invoked by uid 500); 29 Jul 2007 22:33:55 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 13077 invoked by uid 500); 29 Jul 2007 22:33:55 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 13066 invoked by uid 99); 29 Jul 2007 22:33:55 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Jul 2007 15:33:55 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of msebor@gmail.com designates 209.85.146.179 as permitted sender) Received: from [209.85.146.179] (HELO wa-out-1112.google.com) (209.85.146.179) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Jul 2007 22:33:48 +0000 Received: by wa-out-1112.google.com with SMTP id n4so4339575wag for ; Sun, 29 Jul 2007 15:33:28 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:organization:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=nuXosN4jTrJ5Eo7RCq25sKP69023D1eq4FRDIzxR47zJ1PIE33vYjT0xFt0I5cwM1hexAP4RBrLXsTQbuEdNq3HwBHKjsT1afNINZL0ae9VvVyhiC+Kr82GWZR8X1BAdCaJEE9DD+uvgNEzWtBHBjj0zazfkKXE90xrENmAb4mQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:organization:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=iliGjwx1tJOLewEUKeJTP0Z91gUav5FV+sGZKz0ObROuBWHgVEi3sZ2z7VsSm32S7JyuUR6RpS8MC6ILdTpXCW0eOOzBoDGgCO16RFPdZD92EhUkJKpZ9fM93RC8D7v9Jl+G/gLVjKE384CTCgmkRAqKyXFRrkfbNt7pVm5GrPg= Received: by 10.115.92.2 with SMTP id u2mr4953746wal.1185748407944; Sun, 29 Jul 2007 15:33:27 -0700 (PDT) Received: from ?192.168.1.104? ( [71.229.200.170]) by mx.google.com with ESMTPS id l27sm2130221waf.2007.07.29.15.33.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 29 Jul 2007 15:33:27 -0700 (PDT) Message-ID: <46AD15B5.5010605@roguewave.com> Date: Sun, 29 Jul 2007 16:33:25 -0600 From: Martin Sebor Organization: Rogue Wave Software User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.12) Gecko/20070719 Fedora/1.0.9-2.fc6 pango-text SeaMonkey/1.0.9 MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: atomic tests timing out on Windows References: <7BDB2168BEAEF14C98F1901FD2DE6438BB0751@epmsa009.minsk.epam.com> <46A8123C.6010109@roguewave.com> <7BDB2168BEAEF14C98F1901FD2DE6438BB07DB@epmsa009.minsk.epam.com> <46A8D0AA.1050408@roguewave.com> <7BDB2168BEAEF14C98F1901FD2DE6438BB09B0@epmsa009.minsk.epam.com> <46A8EAC7.8040908@roguewave.com> In-Reply-To: <46A8EAC7.8040908@roguewave.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: Martin Sebor X-Virus-Checked: Checked by ClamAV on apache.org Here are a couple of articles from the Intel Knowledge Base that don't appear to come with a restrictive license or even a copyright. The code is Windows-specific but it should be possible to translate it to something understandable to gcc and other compilers (Sun C++ on x86). How to Determine Whether a Processor Supports Hyper-Threading Technology: http://www3.intel.com/cd/ids/developer/asmo-na/eng/dc/threading/knowledgebase/43843.htm How to Determine the Number of Logical Processors per Physical Processor: http://www.intel.com/cd/ids/developer/asmo-na/eng/dc/threading/knowledgebase/43842.htm Martin Martin Sebor wrote: > Farid Zaripov wrote: > [...] >>> If my analysis is correct, we should avoid scheduling the threads on >>> multiple logical CPUs on HT systems with a single physical CPU. >>> Do you agree? >> >> I agree. Now we need to know how to determine if the CPU has >> more than 1 logical CPU. > > It's pretty easy to figure out on modern Linux kernels from > /proc/cpuinfo. I don't know about older kernels or Windows. > >> And I think it is possible to make >> machine with 2 HT-supporting CPU on board? >> >> Here (http://www.intel.com/cd/ids/developer/asmo-na/eng/275339.htm) >> I found the program with sources, that will help us. > > Good stuff! We can read it but we can't copy any of the code > from the sample program because of the Intel license. > > Martin >