cpuset affinity control from within the kernel

John Baldwin jhb at freebsd.org
Mon Mar 30 10:02:00 PDT 2009


On Monday 30 March 2009 12:34:33 pm Barney Cordoba wrote:
> 
> --- On Mon, 3/30/09, John Baldwin <jhb at FreeBSD.org> wrote:
> 
> > From: John Baldwin <jhb at FreeBSD.org>
> > Subject: Re: cpuset affinity control from within the kernel
> > To: freebsd-current at FreeBSD.org, barney_cordoba at 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


More information about the freebsd-current mailing list