Posted on behalf of Srinivas Gowda from Dell Linux Engineering Team
Dell recently announced 12th Generation PowerEdge Servers. It supports host of new features and Hardware. One such hardware feature is to use KCS interrupts for IPMI communication from Linux OS to Baseboard Management Controller (BMC).
In the absence of KCS Interrupts, the IPMI driver would spawn a kernel thread [ kipmi0 ] which is periodically invoked to carry out IPMI transactions from Host Linux OS to BMC. This kernel thread eats up considerable CPU cycles over the course of IPMI transactions. And, most of the time this thread executes without doing any productive work. It just reads the _kcs_interface_status_register (IPMI spec – table9-1) present in BMC. Depending on the values of various bits on the register, IPMI driver regulates IPMI transaction from Linux OS to BMC. The only way Linux IPMI driver will know about these changes is to read this register periodically which is present in the BMC.
In case of interrupt mode, IPMI driver doesn’t require a kernel thread to poll the status of the _kcs_interface_status_register for any changes. Whenever BMC changes this register value, it alerts the IPMI driver using an interrupt. IPMI driver’s ISR routine reads this status register value to carry out IPMI transaction. By enabling IPMI Interrupts, IPMI intensive applications on your Linux OS bring down the CPU load effectively. Please note that IPMI communication over LAN will not use interrupt functionality, since this communication happens over network interface.
The support for IPMI-KCS interrupt on your Dell PowerEdge Platform can be checked in SMBIOS table using the following command:
$ dmidecode -t 38
# dmidecode 2.11SMBIOS 2.7 present.Handle 0x2600, DMI type 38, 18 bytesIPMI Device Information Interface Type: KCS (Keyboard Control Style) Specification Version: 2.0 I2C Slave Address: 0x10 NV Storage Device: Not Present Base Address: 0x0000000000000CA8 (I/O) Register Spacing: 32-bit Boundaries Interrupt Polarity: Active High Interrupt Trigger Mode: Edge Interrupt Number: a
Interrupt number 0x0A is reserved for IPMI driver . If your platform does not support interrupts for IPMI communication, the above last 3 highlighted lines will not be present.
You can also check for interrupt information by checking the /proc/ipmi/0/si_stats file after starting the IPMI service.
$ /etc/init.d/ipmi startStarting ipmi drivers: [ OK ]
$ cat /proc/ipmi/0/si_statsinterrupts_enabled: 1short_timeouts: 4long_timeouts: 1idles: 4interrupts: 247attentions: 0flag_fetches: 0hosed_count: 0complete_transactions: 20events: 0watchdog_pretimeouts: 0 incoming_messages: 0