Re: How to bind a thread to a CPU?

2015-06-14 Thread Neel Natu
Hi Stefan, On Jun 13, 2015, at 12:12 PM, Stefan Andritoiu stefan.andrit...@gmail.com wrote: Hi Neel, On Sat, Jun 13, 2015 at 9:00 PM, Neel Natu neeln...@gmail.com wrote: Hi Stefan, On Sat, Jun 13, 2015 at 3:33 AM, Stefan Andritoiu stefan.andrit...@gmail.com wrote: Hi, How can I

Re: How to bind a thread to a CPU?

2015-06-13 Thread Stefan Andritoiu
Hi Neel, On Sat, Jun 13, 2015 at 9:00 PM, Neel Natu neeln...@gmail.com wrote: Hi Stefan, On Sat, Jun 13, 2015 at 3:33 AM, Stefan Andritoiu stefan.andrit...@gmail.com wrote: Hi, How can I pin a thread to run only on a specific CPU? Is it enough just to set the struct cpuset *td_cpuset of

Re: How to bind a thread to a CPU?

2015-06-13 Thread Neel Natu
Hi Stefan, On Sat, Jun 13, 2015 at 3:33 AM, Stefan Andritoiu stefan.andrit...@gmail.com wrote: Hi, How can I pin a thread to run only on a specific CPU? Is it enough just to set the struct cpuset *td_cpuset of the thread? sched_bind() is the proper way to do this. best Neel Thank you,