PROCESSOR-SDK-AM64X: How to set CPU affinity for specific tasks.

Part Number: PROCESSOR-SDK-AM64X


Tool/software:

Hi,

I am currently working on AM64x Linux_RT, I am looking to have very deterministic task scheduling and deadline handling. After browsing a bit, I got to know that sched_deadline serves my purpose. But when i try to set the CPU affinity by following through online references from Linux foundation, I don't have cpuset option in /sys/fs/cgroup.

Can you please tell me how i could achieve CPU affinity such that, i fix specific tasks to particular CPU on AM64x.

For reference, i got this slide from Linux Foundation.org


Giving SCHED_DEADLINE Affinity
cd /sys/fs/cgroup/cpuset
mkdir my_set
mkdir other_set
echo 0-2 > other_set/cpuset.cpus
echo 0 > other_set/cpuset.mems
echo 1 > other_set/cpuset.sched_load_balance
echo 1 > other_set/cpuset.cpu_exclusive
echo 3 > my_set/cpuset.cpus
echo 0 > my_set/cpuset.mems
echo 1 > my_set/cpuset.sched_load_balance
echo 1 > my_set/cpuset.cpu_exclusive
echo 0 > cpuset.sched_load_balance

Thank you in advance.

Solomon

  • Hello Solomon,

    Apologies for the delayed responses here. Are you still looking for guidance?

    Please note that we can only support questions about TI software running on TI hardware on these forums. "How to set CPU affinity" is a generic Linux question. I can provide limited guidance, but you will need to go elsewhere online for more in-depth training.

    Regards,

    Nick