Message ID | 1582498270-50674-1-git-send-email-schaecsn@gmx.net |
---|---|
Headers | show |
Series | i2c: imc: Add support for Intel iMC SMBus host controller. | expand |
On Mon, Feb 24, 2020 at 12:54 AM Stefan Schaeckeler <schaecsn@gmx.net> wrote: > > This patch is based on Andy Lutomirski's iMC SMBus driver patch-set > https://lkml.org/lkml/2016/4/28/926. It never made it into the kernel. I hope > this rewrite will: Thanks for the patch! I'll review the code later. I think the better to have a documentation file where you describe stuff like enumeration and so on for this drivers (under Documentation folder). > Stefan Schaeckeler (1): > i2c: imc: Add support for Intel iMC SMBus host controller. > > MAINTAINERS | 5 + > drivers/i2c/busses/Kconfig | 15 ++ > drivers/i2c/busses/Makefile | 1 + > drivers/i2c/busses/i2c-imc.c | 515 +++++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 536 insertions(+) > create mode 100644 drivers/i2c/busses/i2c-imc.c > > -- > 2.11.0 >
On Sun, Feb 23, 2020 at 2:52 PM Stefan Schaeckeler <schaecsn@gmx.net> wrote: > > This patch is based on Andy Lutomirski's iMC SMBus driver patch-set > https://lkml.org/lkml/2016/4/28/926. It never made it into the kernel. I hope > this rewrite will: > > > Overview > > Modern Intel memory controllers host an SMBus controller and connection to > DIMMs and their thermal sensors. The memory controller firmware has three modes > of operation: Closed Loop Thermal Throttling (CLTT), Open Loop Thermal > Throttling (OLTT) and none. > > - CLTT: The memory controller firmware is periodically accessing the DIMM > temperature sensor over the SMBus. > I think this is great! One question, though: what happens if the system is in CLTT mode but you disable CLTT and claim the bus for too long? For example, if there's an infinite loop or other lockup which you have the tsod polling interval set to 0? Does the system catch fire or does the system do something intelligent like temporarily switching to open loop?
Hello Any, > > This patch is based on Andy Lutomirski's iMC SMBus driver patch-set > > https://lkml.org/lkml/2016/4/28/926. It never made it into the kernel. I hope > > this rewrite will: > > > > > > Overview > > > > Modern Intel memory controllers host an SMBus controller and connection to > > DIMMs and their thermal sensors. The memory controller firmware has three modes > > of operation: Closed Loop Thermal Throttling (CLTT), Open Loop Thermal > > Throttling (OLTT) and none. > > > > - CLTT: The memory controller firmware is periodically accessing the DIMM > > temperature sensor over the SMBus. > > > > > I think this is great! One question, though: what happens if the > system is in CLTT mode but you disable CLTT and claim the bus for too > long? For example, if there's an infinite loop or other lockup which > you have the tsod polling interval set to 0? Does the system catch > fire or does the system do something intelligent like temporarily > switching to open loop? I don't know. Most likely, the current memory throttling rate will be kept. That might not be enough for the forthcoming workload and, ehm, the system may catch fire. I assume our use-case is the most common use-case for this driver: our embedded system comes with its own environmental management software. It monitors, among other sensor values, the DIMM temperatures and takes action on abnormal values. If one is concerned about your scenario, then the environmental management software needs to consider blocked reads on the sysfs node as a worst case scenario and reboot the system. Nothing can really go wrong while the polling interval is set to 0, though: - reading and setting pci configuration space registers. - calling dev_err, dev_warn and alike. - usleep_range(131,140) and up to 20 udelay(9). What is not clear to me is what if imc_smbus_xfer() is executing while the driver is rmmod-ed. Defensively, I set in the driver's remove function the tsod_polling_interval back to its original value. ~ Stefan
On Tue, Feb 25, 2020 at 01:49:34PM -0800, Andy Lutomirski wrote: > On Sun, Feb 23, 2020 at 2:52 PM Stefan Schaeckeler <schaecsn@gmx.net> wrote: > > > > This patch is based on Andy Lutomirski's iMC SMBus driver patch-set > > https://lkml.org/lkml/2016/4/28/926. It never made it into the kernel. I hope > > this rewrite will: > > > > > > Overview > > > > Modern Intel memory controllers host an SMBus controller and connection to > > DIMMs and their thermal sensors. The memory controller firmware has three modes > > of operation: Closed Loop Thermal Throttling (CLTT), Open Loop Thermal > > Throttling (OLTT) and none. > > > > - CLTT: The memory controller firmware is periodically accessing the DIMM > > temperature sensor over the SMBus. > > > > > I think this is great! One question, though: what happens if the > system is in CLTT mode but you disable CLTT and claim the bus for too > long? For example, if there's an infinite loop or other lockup which > you have the tsod polling interval set to 0? Does the system catch > fire or does the system do something intelligent like temporarily > switching to open loop? Any news on this question?
Hello Wolfram, > > > This patch is based on Andy Lutomirski's iMC SMBus driver patch-set > > > https://lkml.org/lkml/2016/4/28/926. It never made it into the kernel. I hope > > > this rewrite will: > > > > > > > > > Overview > > > > > > Modern Intel memory controllers host an SMBus controller and connection to > > > DIMMs and their thermal sensors. The memory controller firmware has three modes > > > of operation: Closed Loop Thermal Throttling (CLTT), Open Loop Thermal > > > Throttling (OLTT) and none. > > > > > > - CLTT: The memory controller firmware is periodically accessing the DIMM > > > temperature sensor over the SMBus. > > > > > > > > > I think this is great! One question, though: what happens if the > > system is in CLTT mode but you disable CLTT and claim the bus for too > > long? For example, if there's an infinite loop or other lockup which > > you have the tsod polling interval set to 0? Does the system catch > > fire or does the system do something intelligent like temporarily > > switching to open loop? > > Any news on this question? Thank you for your interest in this patch. You can read my reply here https://lkml.org/lkml/2020/3/1/216 Stefan
On Sun, Apr 5, 2020 at 2:41 PM Stefan Schaeckeler <schaecsn@gmx.net> wrote: > > Hello Wolfram, > > > > > This patch is based on Andy Lutomirski's iMC SMBus driver patch-set > > > > https://lkml.org/lkml/2016/4/28/926. It never made it into the kernel. I hope > > > > this rewrite will: > > > > > > > > > > > > Overview > > > > > > > > Modern Intel memory controllers host an SMBus controller and connection to > > > > DIMMs and their thermal sensors. The memory controller firmware has three modes > > > > of operation: Closed Loop Thermal Throttling (CLTT), Open Loop Thermal > > > > Throttling (OLTT) and none. > > > > > > > > - CLTT: The memory controller firmware is periodically accessing the DIMM > > > > temperature sensor over the SMBus. > > > > > > > > > > > > > I think this is great! One question, though: what happens if the > > > system is in CLTT mode but you disable CLTT and claim the bus for too > > > long? For example, if there's an infinite loop or other lockup which > > > you have the tsod polling interval set to 0? Does the system catch > > > fire or does the system do something intelligent like temporarily > > > switching to open loop? > > > > Any news on this question? > > Thank you for your interest in this patch. You can read my reply here > https://lkml.org/lkml/2020/3/1/216 I think it could make sense to upstream this driver but to require a scary boot-time option to enable it. Maybe i2c_imc.dangerous=1? > > Stefan