From owner-freebsd-current@FreeBSD.ORG Mon Mar 30 17:02:00 2009 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 2C6321065670 for ; Mon, 30 Mar 2009 17:02:00 +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 EF61D8FC16 for ; Mon, 30 Mar 2009 17:01:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id 5B27E46B35; Mon, 30 Mar 2009 13:01:59 -0400 (EDT) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n2UH1reH023682; Mon, 30 Mar 2009 13:01:53 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: barney_cordoba@yahoo.com Date: Mon, 30 Mar 2009 12:49:58 -0400 User-Agent: KMail/1.9.7 References: <285609.93285.qm@web63905.mail.re1.yahoo.com> In-Reply-To: <285609.93285.qm@web63905.mail.re1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903301249.58983.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 30 Mar 2009 13:01:53 -0400 (EDT) X-Virus-Scanned: ClamAV 0.94.2/9181/Mon Mar 30 11:21:09 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: freebsd-current@freebsd.org Subject: Re: cpuset affinity control from within the kernel 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: Mon, 30 Mar 2009 17:02:00 -0000 On Monday 30 March 2009 12:34:33 pm Barney Cordoba wrote: > > --- On Mon, 3/30/09, John Baldwin wrote: > > > From: John Baldwin > > Subject: Re: cpuset affinity control from within the kernel > > To: freebsd-current@FreeBSD.org, barney_cordoba@yahoo.com > > Date: Monday, March 30, 2009, 11:00 AM > > On Sunday 29 March 2009 3:59:40 pm Barney Cordoba wrote: > > > > > > What tools are available for taskqueues, interrupts, > > etc from within the > > kernel? > > > > You can use BUS_BIND_INTR() for interrupts. You can use > > 'sched_bind() / > > sched_unbind()' in thread contexts. For example, to > > pin taskqueue threads > > (you should only do this for a private taskqueue you create > > though) you can > > simply enqueue a task to the thread that does a > > 'sched_bind()'. > > > > -- > > John Baldwin > > There doesn't seem to be a man page for those functions. Are there some > docs somewhere? Can I bind to a set of cores as can be done with cpuset? They both take a single CPU as the argument, so you can only bind to one. -- John Baldwin