Re: how to make driver only runs on one of CPUs?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
js
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux