Do the changes to cpumask using sched_setaffinity() take place immediately
Posted
by Sukanto
on Stack Overflow
See other posts from Stack Overflow
or by Sukanto
Published on 2010-04-01T10:01:19Z
Indexed on
2010/04/01
10:03 UTC
Read the original article
Hit count: 102
I am writing a linux kernel module that needs to pin two threads on two different cpus. I am planning to use sched_setaffinity() after exporting it in the kernel. Is there any other exported function for the same ?
Also, if I set only 1 CPU in the cpumask, will the thread be moved to that cpu with immediate effect ? If not, how do I enforce the same ? Will it help to call schedule() just after sched_setaffinity() ?
© Stack Overflow or respective owner