Skip to content

Commit

Permalink
Merge pull request #219 from OpenVoiceOS/feat/numa
Browse files Browse the repository at this point in the history
[ansible/tuning] Enable NUMA for Raspberry Pi 4 and 5
  • Loading branch information
goldyfruit authored Dec 2, 2024
2 parents 4c7cf45 + 472df5c commit 2226881
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ansible/roles/ovos_installer/tasks/tuning/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@

- name: Include tuning/fstab.yml
ansible.builtin.import_tasks: tuning/fstab.yml

- name: Include tuning/numa.yml
ansible.builtin.import_tasks: tuning/numa.yml
when: "'Raspberry Pi 4' in ovos_installer_raspberrypi or 'Raspberry Pi 5' in ovos_installer_raspberrypi"
12 changes: 12 additions & 0 deletions ansible/roles/ovos_installer/tasks/tuning/numa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
- name: Enable NUMA for Raspberry Pi 4 & 5
vars:
_fake_number: "{{ '4' if 'Raspberry Pi 5' in ovos_installer_raspberrypi else '2' }}"
ansible.builtin.lineinfile:
path: "{{ _boot_directory }}/cmdline.txt"
regexp: "^((?!.*{{ item }}).*console.*)$"
line: '\1 {{ item }}'
backrefs: true
loop:
- "numa=fake={{ _fake_number }}"
- numa_policy=interleave

0 comments on commit 2226881

Please sign in to comment.