[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48232092.9090209@isomerica.net>
Date: Thu, 08 May 2008 11:47:30 -0400
From: Dan Noe <dpn@...merica.net>
To: Brian McGrew <brian@...ionpro.com>
CC: linux-kernel@...r.kernel.org
Subject: Re: Two questions about scheduling and threading.
On 5/8/2008 11:15, Brian McGrew wrote:
> Also, I know that we're supposed to sit back and let the scheduler do all
> the work for us; but, in the 2.6.16.16 kernel, is there a way to assign a
> specific thread and/or process to a designated processor??? I really need
> to be able to do this because even with the preemptive scheduling, I'm still
> real-time and it's not quite real-time enough!
There are some functions to set CPU affinity from user space:
sched_setaffinity()
sched_getaffinity()
And a user space program:
taskset
All have decent man pages. They'll allow you to pin a process to a
particular CPU, or set the normal behavior, which is to try and keep a
process on the same CPU as long as possible. There are some other
utilities mentioned in the related section of the manpages - they allow
you to tweak scheduler behavior.
Hope that helps.
Cheers,
Dan
--
/--------------- - - - - - -
| Dan Noe
| http://isomerica.net/~dpn/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists