how to make driver only runs on one of CPUs?
jirislaby at gmail.com
Mon Mar 29 14:01:10 PDT 2010
On 03/29/2010 05:33 PM, hong zhang wrote:
> Chris, Jiri,
> I only find user space application could call sched_setaffinity(pid,
> ...). No driver is calling it by checking drivers/ subdirectory.
Why is not kthread (with kthread_bind) good for you? You could also use
set_cpus_allowed_ptr, but I discourage you doing so until you give a reason.
> Also, if device has two separate CPUs on board and they share same PCI
> bus or device,
> how to avoid both CPUs access to the bus or device at same time?
Could you elaborate on that? It is a board with 2 CPUs and you want only
one CPU to operate on arbitrary device? And you have drivers for all the
devices and want to ensure this on all of them?
If you do not explain this in more detail I'm afraid we can't help you.
More information about the devel