Another improvement proposal for the Cubitruck and other multiprocessor
installations.

CPU1 usually runs completly idle! All interrupts are assigned to a
single CPU0 (see: cat /proc/interrupts)

Below a script and a systemd.service that assigns eth0 to the 2nd CPU.

/usr/local/bin/eth0affinity

Code:
--------------------
    
  #!/bin/bash
  # This script  assigns the eth0 interrupt to the 2nd processor on the 
Cubitruck board.
  # It's started by the eth0affinity.service
  #############################################
  
  echo 2 > /proc/irq/$(cat /proc/interrupts | grep eth0 | cut -f 1 -d ":" 
)/smp_affinity
  
  exit 0
  
--------------------




/etc/systemd/system/eth0affinity.service

Code:
--------------------
    
  [Unit]
  Description=  Assigns eth0 IRQ to 2nd CPU
  
  [Service]
  Type=oneshot
  ExecStart=/usr/local/bin/eth0affinity
  
  [Install]
  WantedBy=multi-user.target
  
--------------------


Cheers



::: ' Touch Toolbox and more' (http://soundcheck-audio.blogspot.com) :::
by soundcheck
------------------------------------------------------------------------
soundcheck's Profile: http://forums.slimdevices.com/member.php?userid=34383
View this thread: http://forums.slimdevices.com/showthread.php?t=101624

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to