From owner-freebsd-current@FreeBSD.ORG Wed Jan 21 14:25:42 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 60B0D1065745; Wed, 21 Jan 2009 14:25:42 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3898F8FC27; Wed, 21 Jan 2009 14:25:42 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id C344946B32; Wed, 21 Jan 2009 09:25:41 -0500 (EST) Date: Wed, 21 Jan 2009 14:25:41 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Barney Cordoba In-Reply-To: <423770.14655.qm@web63902.mail.re1.yahoo.com> Message-ID: References: <423770.14655.qm@web63902.mail.re1.yahoo.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: jeff@FreeBSD.org, freebsd-current@freebsd.org, Ivan Voras Subject: Re: Binding timer interrupt to a cpu core 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: Wed, 21 Jan 2009 14:25:43 -0000 On Wed, 21 Jan 2009, Barney Cordoba wrote: >> Interrupts can be bound to CPUs but only by using APIs within the kernel >> (there's no userland utility for it). > > I'm asking HOW, to do it within the kernel. > > When I said timer, I meant software interrupts created with timeout() This is supported in FreeBSD 8.x, but not yet 7.x and earlier. Whoever added this support failed to update the timeout(9) man page, however, so the source is the reference -- take a look at callout.h, but gist is that you can call callout_reset_on(), callout_reset_curcpu(), callout_schedule_on(), and callout_schedule_curcpu() to specify the next CPU that the callout should run on. (Jeff Roberson CC'd to remind him that he wants to update timeout.9, or find someone to help him do that, so that it includes the new interfaces). Robert N M Watson Computer Laboratory University of Cambridge