2

From man systemd.resource_control, it seems that there is no options for cpuset controller. Then how to set it in a unit file?

My purpose is to have the values set during boot time.

I know how to do it after booting by directly writing numbers into the corresponding cpuset.cpus file. But I'd like to have a way to persist the settings.

doraemon
  • 421

1 Answers1

1

man systemd.resource-control points to: "AllowedCPUs="

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
yarl
  • 502
  • Is this dependent on a particular version of systemd? The man pages on one system here (v219) don't have that AllowedCPUs option. – Jeff Schaller Nov 17 '21 at 21:46
  • 1
    A quick search lands at https://github.com/systemd/systemd/commit/31d3a520297980ac31186e27396a05f928fde49f#diff-e846fc8ed54d1fd65293317afb5fa8acfdabe4b59629e8810e98b8c21bc40eae, indicating that Sept 15 2021 had a relevant commit. – Jeff Schaller Nov 17 '21 at 21:50
  • Thanks a lot @yarl. How are the names like AllowedCPUs mapped to cpuset.cpus in the source code? If I want to set other cpuset interface, how can I get the correct key name in the unit file? – doraemon Nov 17 '21 at 23:49
  • I found something like cpuset_cpus in the source code, but no cpuset_cpus_partition – doraemon Nov 17 '21 at 23:55