From owner-freebsd-threads@FreeBSD.ORG Tue Aug 27 05:04:22 2013 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 61CCA2BD for ; Tue, 27 Aug 2013 05:04:22 +0000 (UTC) (envelope-from davidxu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 342B82AA2 for ; Tue, 27 Aug 2013 05:04:22 +0000 (UTC) Received: from xyf.my.dom (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7R54LLr088894 for ; Tue, 27 Aug 2013 05:04:21 GMT (envelope-from davidxu@freebsd.org) Message-ID: <521C3381.3030207@freebsd.org> Date: Tue, 27 Aug 2013 13:05:05 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:17.0) Gecko/20130416 Thunderbird/17.0.5 MIME-Version: 1.0 To: freebsd-threads@freebsd.org Subject: Re: About CPU cores numbering an processor affinity References: <1D21F5BC-63CD-4B33-9286-6687E62FDB15@gmail.com> <970B3263-4689-4F8A-B012-DA88A1266F45@gmail.com> In-Reply-To: <970B3263-4689-4F8A-B012-DA88A1266F45@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 05:04:22 -0000 sysctl kern.sched.topology_spec ? On 2013/08/26 21:33, Dmitry Sivachenko wrote: > Nobody answered on -hackers, I try to ask there. > > Begin forwarded message: > >> From: Dmitry Sivachenko >> Subject: About CPU cores numbering an processor affinity >> Date: 23 августа 2013 г., 17:23:51 GMT+04:00 >> To: hackers@freebsd.org >> >> 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? From 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} >> >> From 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! >> > > _______________________________________________ > freebsd-threads@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org" >