From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 7 06:26:32 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E381816A40F; Sat, 7 Oct 2006 06:26:32 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from com1.ht-systems.ru (com1.ht-systems.ru [83.97.104.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A7ED43D45; Sat, 7 Oct 2006 06:26:32 +0000 (GMT) (envelope-from stas@FreeBSD.org) Received: from [83.97.106.135] (helo=fonon.realnet) by com1.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1GW5cV-00026a-6N; Sat, 07 Oct 2006 10:25:11 +0400 Received: from localhost (localhost [127.0.0.1]) by fonon.realnet (Postfix) with SMTP id B4F8211B3C; Sat, 7 Oct 2006 10:26:13 +0400 (MSD) Date: Sat, 7 Oct 2006 10:26:09 +0400 From: Stanislav Sedov To: David Xu Message-Id: <20061007102609.c0c768a4.stas@FreeBSD.org> In-Reply-To: <200610070738.12529.davidxu@freebsd.org> References: <20061004214040.GA6878@porthos.spock.org> <200610050829.36266.davidxu@freebsd.org> <20061006174504.c4af61ba.stas@FreeBSD.org> <200610070738.12529.davidxu@freebsd.org> Organization: The FreeBSD Project X-Mailer: carrier-pigeon X-Voice: +7 916 849 20 23 X-XMPP: ssedov@jabber.ru X-ICQ: 208105021 X-Yahoo: stanislav_sedov X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-University: MEPhI Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Sat__7_Oct_2006_10_26_09_+0400__l/DQ+Q6pE05Z876" X-Spam-Flag: SKIP Cc: Stanislav Sedov , freebsd-hackers@freebsd.org, Jonathan Chen Subject: Re: running code on all CPUs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Oct 2006 06:26:33 -0000 --Signature=_Sat__7_Oct_2006_10_26_09_+0400__l/DQ+Q6pE05Z876 Content-Type: text/plain; charset=KOI8-R Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, 7 Oct 2006 07:38:12 +0800 David Xu mentioned: > On Friday 06 October 2006 21:45, Stanislav Sedov wrote: > > > AFAIK, you can use scheduler API, the sched_bind() moves current th= read > > > to a specific CPU, hope this helps. > > > > You can find examples e.g. in hwpmc driver. Just grep by sched_bin. > > > > -- > > Stanislav Sedov [[=F2=CF=D3=D3=C9=D1= , =ED=CF=D3=CB=D7=C1]] > > PGP id: 0xEB269581 http://people.freebsd.org/~stas/stas.key.asc > > sched_pin is different than sched_bind, sched_pin only pins current thr= ead on > current cpu, but sched_bind allows a thread to migrate to another CPU, = after > the sched_bind returns, the thread should already be running on the spe= cified > CPU, it makes it possible that a thread can iterate through all availa= ble > CPUs. > Yeah;-) I mean sched_bind, just typo. -- Stanislav Sedov [[=F2=CF=D3=D3=C9=D1, = =ED=CF=D3=CB=D7=C1]] PGP id: 0xEB269581 http://people.freebsd.org/~stas/stas.key.asc --Signature=_Sat__7_Oct_2006_10_26_09_+0400__l/DQ+Q6pE05Z876 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFJ0iFK/VZk+smlYERAg8eAJ48S5O8iUgs9jvgs9hSKSiZsdONQgCffAJ2 CeQrC4rk6IgqPGAj3BGMQKs= =KOcR -----END PGP SIGNATURE----- --Signature=_Sat__7_Oct_2006_10_26_09_+0400__l/DQ+Q6pE05Z876--