Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

IRQ-affinity.txt: standardize document format

Each text file under Documentation follows a different
format. Some doesn't even have titles!

Change its representation to follow the adopted standard,
using ReST markups for it to be parseable by Sphinx:

- Add a title for the document;
- mark literal blocks as such;
- use a bulleted list for changelog.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
ae2f26aa f5981a5c

+41 -36
+41 -36
Documentation/IRQ-affinity.txt
··· 1 - ChangeLog: 2 - Started by Ingo Molnar <mingo@redhat.com> 3 - Update by Max Krasnyansky <maxk@qualcomm.com> 4 - 1 + ================ 5 2 SMP IRQ affinity 3 + ================ 4 + 5 + ChangeLog: 6 + - Started by Ingo Molnar <mingo@redhat.com> 7 + - Update by Max Krasnyansky <maxk@qualcomm.com> 8 + 6 9 7 10 /proc/irq/IRQ#/smp_affinity and /proc/irq/IRQ#/smp_affinity_list specify 8 11 which target CPUs are permitted for a given IRQ source. It's a bitmask ··· 19 16 Default mask is 0xffffffff. 20 17 21 18 Here is an example of restricting IRQ44 (eth1) to CPU0-3 then restricting 22 - it to CPU4-7 (this is an 8-CPU SMP box): 19 + it to CPU4-7 (this is an 8-CPU SMP box):: 23 20 24 - [root@moon 44]# cd /proc/irq/44 25 - [root@moon 44]# cat smp_affinity 26 - ffffffff 21 + [root@moon 44]# cd /proc/irq/44 22 + [root@moon 44]# cat smp_affinity 23 + ffffffff 27 24 28 - [root@moon 44]# echo 0f > smp_affinity 29 - [root@moon 44]# cat smp_affinity 30 - 0000000f 31 - [root@moon 44]# ping -f h 32 - PING hell (195.4.7.3): 56 data bytes 33 - ... 34 - --- hell ping statistics --- 35 - 6029 packets transmitted, 6027 packets received, 0% packet loss 36 - round-trip min/avg/max = 0.1/0.1/0.4 ms 37 - [root@moon 44]# cat /proc/interrupts | grep 'CPU\|44:' 38 - CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 39 - 44: 1068 1785 1785 1783 0 0 0 0 IO-APIC-level eth1 25 + [root@moon 44]# echo 0f > smp_affinity 26 + [root@moon 44]# cat smp_affinity 27 + 0000000f 28 + [root@moon 44]# ping -f h 29 + PING hell (195.4.7.3): 56 data bytes 30 + ... 31 + --- hell ping statistics --- 32 + 6029 packets transmitted, 6027 packets received, 0% packet loss 33 + round-trip min/avg/max = 0.1/0.1/0.4 ms 34 + [root@moon 44]# cat /proc/interrupts | grep 'CPU\|44:' 35 + CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 36 + 44: 1068 1785 1785 1783 0 0 0 0 IO-APIC-level eth1 40 37 41 38 As can be seen from the line above IRQ44 was delivered only to the first four 42 39 processors (0-3). 43 40 Now lets restrict that IRQ to CPU(4-7). 44 41 45 - [root@moon 44]# echo f0 > smp_affinity 46 - [root@moon 44]# cat smp_affinity 47 - 000000f0 48 - [root@moon 44]# ping -f h 49 - PING hell (195.4.7.3): 56 data bytes 50 - .. 51 - --- hell ping statistics --- 52 - 2779 packets transmitted, 2777 packets received, 0% packet loss 53 - round-trip min/avg/max = 0.1/0.5/585.4 ms 54 - [root@moon 44]# cat /proc/interrupts | 'CPU\|44:' 55 - CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 56 - 44: 1068 1785 1785 1783 1784 1069 1070 1069 IO-APIC-level eth1 42 + :: 43 + 44 + [root@moon 44]# echo f0 > smp_affinity 45 + [root@moon 44]# cat smp_affinity 46 + 000000f0 47 + [root@moon 44]# ping -f h 48 + PING hell (195.4.7.3): 56 data bytes 49 + .. 50 + --- hell ping statistics --- 51 + 2779 packets transmitted, 2777 packets received, 0% packet loss 52 + round-trip min/avg/max = 0.1/0.5/585.4 ms 53 + [root@moon 44]# cat /proc/interrupts | 'CPU\|44:' 54 + CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 55 + 44: 1068 1785 1785 1783 1784 1069 1070 1069 IO-APIC-level eth1 57 56 58 57 This time around IRQ44 was delivered only to the last four processors. 59 58 i.e counters for the CPU0-3 did not change. 60 59 61 - Here is an example of limiting that same irq (44) to cpus 1024 to 1031: 60 + Here is an example of limiting that same irq (44) to cpus 1024 to 1031:: 62 61 63 - [root@moon 44]# echo 1024-1031 > smp_affinity_list 64 - [root@moon 44]# cat smp_affinity_list 65 - 1024-1031 62 + [root@moon 44]# echo 1024-1031 > smp_affinity_list 63 + [root@moon 44]# cat smp_affinity_list 64 + 1024-1031 66 65 67 66 Note that to do this with a bitmask would require 32 bitmasks of zero 68 67 to follow the pertinent one.