How to set the affinity of the runnable

Please provide the following info (tick the boxes after creating this topic):
Software Version
[*] DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other

Target Operating System
[*] Linux
QNX
other

Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
[*] DRIVE AGX Orin Developer Kit (not sure its number)
other

SDK Manager Version
[*] 1.9.2.10884
other

Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager
[*] native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other

I want runnables run on fixed core,but sched_setaffinity() or pthread_setaffinity_np() has no effect. How can I set the affinity of the runnable?

Dear @lizhaoyi,
Could you share the output of ll /sys/fs/cgroup/cpuset/ ?

Dear @SivaRamaKrishnaNV ,

cgroup.clone_children
0
cgroup.sane_behavior
0
cpuset.cpu_exclusive
1
cpuset.cpus
0-11
cpuset.effective_cpus
0-11
cpuset.effective_mems
0
cpuset.sched_load_balance
1
cpuset.sched_relax_domain_level
-1
notify_on_release
0

cgroup.procs (3.5 KB)
tasks (4.0 KB)

Dear @lizhaoyi,
It seems cpuset files are missing on machine causing the issue.
Could you share full logs and sample code?

Dear @SivaRamaKrishnaNV
Maybe is cpuset files are missing.Reflash the device and no this issue arise.

Dear @lizhaoyi,
Issue fixed after reflash?

Dear @SivaRamaKrishnaNV,
I’m not sure. According to your suggestions,other colleagues often flash the machine because of development environmental problems.Anyway, my test this time is ok.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.