From owner-freebsd-current@FreeBSD.ORG Tue Oct 25 18:05:47 2011 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 C48DF106564A for ; Tue, 25 Oct 2011 18:05:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9D22D8FC18 for ; Tue, 25 Oct 2011 18:05:47 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 53A5646B0D; Tue, 25 Oct 2011 14:05:47 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id DF7128A02E; Tue, 25 Oct 2011 14:05:46 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Tue, 25 Oct 2011 13:42:45 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <20111025150622.GA7462@onelab2.iet.unipi.it> In-Reply-To: <20111025150622.GA7462@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201110251342.45194.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 25 Oct 2011 14:05:47 -0400 (EDT) Cc: Luigi Rizzo Subject: Re: getting the cpuid for a userspace process ? 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, 25 Oct 2011 18:05:47 -0000 On Tuesday, October 25, 2011 11:06:22 am Luigi Rizzo wrote: > as the subject says... is there any way to get the current > CPU id for a userspace process (of course, > valid only at the time the function is called as the > process might be arbitrarily moved while it runs) Not from userland, no. On x86 you can use cpuid to fetch the APIC ID, but that does not map 1:1 to FreeBSD cpu IDs. -- John Baldwin