From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 23 13:25:30 2013 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BFBB2EF4 for ; Fri, 23 Aug 2013 13:25:30 +0000 (UTC) (envelope-from trtrmitya@gmail.com) Received: from mail-la0-x22e.google.com (mail-la0-x22e.google.com [IPv6:2a00:1450:4010:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 46C7026F8 for ; Fri, 23 Aug 2013 13:25:30 +0000 (UTC) Received: by mail-la0-f46.google.com with SMTP id eh20so472450lab.19 for ; Fri, 23 Aug 2013 06:25:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=SiVxDzttwmVcgIVgPI4X4MmA0Utun6L8gI6m8a1Pdgc=; b=uBX4GlS9zL76wJK1bPXQ0c8iFNzVyayDz/s2q2tLJeWjNYhzGG0TzAbv3NApH8B7YO Kby9p5M+yBJ53MWOhPiuXDkSu3F+mZJtTxPYkbuJLlY2Cp2pbtxv9yO/XcWnCiT0s5TO Lpdw9D1LP6JfkXFzftsUlHSLtcuIxLK/vA0/vLAgIPAVarvSo09VU03vOgdiL58c7xqZ NGe4bZiz8NRz2KIwFlbedx8rpPQyeoFO4vYrtQgwQNoA/4QKkCpCGakI93KYVm/XyrC+ N6ANRLUIcflqJLcMpSB3HzwOKon6rH0/78/w2Rb/E4vGnoJssLj1BAcgxmsv8s68Ygpl wXVw== X-Received: by 10.152.26.72 with SMTP id j8mr15406300lag.19.1377264328121; Fri, 23 Aug 2013 06:25:28 -0700 (PDT) Received: from [10.0.1.20] (ip-95-220-140-40.bb.netbynet.ru. [95.220.140.40]) by mx.google.com with ESMTPSA id o1sm6703932lah.8.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Aug 2013 06:23:51 -0700 (PDT) From: Dmitry Sivachenko Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: About CPU cores numbering an processor affinity Message-Id: <1D21F5BC-63CD-4B33-9286-6687E62FDB15@gmail.com> Date: Fri, 23 Aug 2013 17:23:51 +0400 To: hackers@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) X-Mailer: Apple Mail (2.1508) X-Mailman-Approved-At: Fri, 23 Aug 2013 15:16:33 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 13:25:30 -0000 Hello! I am using FreeBSD-9-STABLE on the following hardware: FreeBSD/SMP: Multiprocessor System Detected: 24 CPUs FreeBSD/SMP: 2 package(s) x 6 core(s) x 2 SMT threads So I have 2 physical CPUs with 6 core each. # cpuset -g pid -1 mask: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, = 17, 18, 19, 20, 21, 22, 23 So each of 24 cores are numbered 0..23. 1) In what particular order are these cores numbered? Can I assume that = 0..11 correspond to 1st physical CPU and 12..23 to second? How SMT = threads are numbered within each core? 2) This machine has Intel network adapter (em driver). I want to pin = network interrupt thread and proxy software to the same processor so = they share at least L2 or L3 cache. How can I do this? =46rom the one = hand, I see the following processes: 11 root -92 - 0K 720K WAIT 19 146:38 0.00% = intr{irq260: em1:rx 0} 11 root -92 - 0K 720K WAIT 19 15:11 0.00% = intr{irq261: em1:tx 0} =46rom the other hand, the following processes seems to be unrelated to = network but they share same PID: 11 root -60 - 0K 720K WAIT 1 131:20 0.00% = intr{swi4: clock} 11 root -88 - 0K 720K WAIT 17 40:03 0.00% = intr{irq263: ahci0} 11 root -72 - 0K 720K WAIT 22 17:35 0.00% = intr{swi1: netisr 0} 11 root -88 - 0K 720K WAIT 3 3:08 0.00% = intr{irq256: mfi0} Should I use "-x" option of cpuset for that purpose (to bind irq 260 and = 261 in my example)? Thanks in advance!