Solution write error: Value too large for defined data type

Once I manually bind the interrupts of the Intel network adapter to the processor cores and ran into an error:

echo 100000000 > /proc/irq/278/smp_affinity
bash: echo: write error: Value too large for defined data type

That is, I successfully tied 32 interrupts to processor cores from 0 to 31, and 33 interrupts failed to indicate the 32nd core.
I looked at the contents of the directory of the desired irq:

ls /proc/irq/278/

I found that there is a smp_affinity_list file in which you can specify the range of CPU cores in digital form and indicated core 32:

echo 32 > /proc/irq/278/smp_affinity_list

After that, I checked the smp_affinity file and saw how the system indicated this core in hex format:

cat /proc/irq/278/smp_affinity
00001,00000000

cat /proc/irq/278/smp_affinity_list
32

That is, starting from the 32nd core, you must specify the value separated by commas, for example:

echo 1,00000000 > /proc/irq/278/smp_affinity
echo 2,00000000 > /proc/irq/279/smp_affinity
echo 4,00000000 > /proc/irq/280/smp_affinity
echo 8,00000000 > /proc/irq/281/smp_affinity
echo 10,00000000 > /proc/irq/282/smp_affinity
echo 20,00000000 > /proc/irq/283/smp_affinity

See also my articles:
Script to bind Intel NIC interrupts to processor cores
Distribution of network card interrupts across processor cores

Leave a comment

Leave a Reply